Which of the following are valid statements regarding the message listener interface required by the message driven bean?
[A] Bean's message listener interface cannot define more than one message listener method.
[B] For multiple methods in message listener interface, it is resource adaptor, which determines which method to call.
[C] Message listener interface has no role to play in determining the supported messaging type by a message driven bean.
[D] Message listener interface actually distinguishes the messaging type a message bean can support
According to WhizLabs, B and D are the correct answers.
I couldn't understand anything about this. Can someone tell me what is this message listener interface, and will it appear on the real exam?
I recommend reading chapter 5 in core spec. For instance, parts of Whizzlab's question can be answered directly from 5.4.2.
The thing that is confusing here is almost all the examples for MDB is using JMS MessageListener, so our thinking is confined on it. And JMS has its own message types, ObjectMessage, TextMessage and so on. MDB can not distinguish these types. But the "message type" here means a bigger scope. That is, other than JMS, MDB can support other message system.
So for the first pair, the JMS MessageListener only has one method onMessage(). That doesn't mean other message system can only have one method.
Is my understanding right?