Message Driven Bean (MDB)
A message driven bean is an EJB that also implements the javax.jms.MessageListener interface.
The container delivers messages to the onMessage method as messages become available.
Differences from other EJBs
You cannot invoke an MDB, i.e. it is not RPC. You communicate with the MDB by sending messages
According to that specification it is an application error for the onMessage method to throw a
RuntimeException, e.g. throwing an EJBException is not allowed.
The behaviour of applications that do this is not defined by the spec and such applications will not be portable.
Differences from JMS message listeners
This means that unlike a QueueReceivers MessageListener, the order of delivery cannot be guaranteed unless
you set these pool sizes to 1 (one).