Is there any difference between an asynchronous JMS (Java Messaging Service) consumer vs an actual MDB (Message Driven Bean). The only difference I see is the MDB class
has @MessageDriven
annotation which the asynchronous JMS consumer doesn't.
Anything else that I am missing ?
Your MDB works as JMS consumer in your case. MDB is EJB specific term and consumer is a JMS term. A JMS consumer can be a message driven POJO as well which is not technically an EJB.
A1. Yes it is correct to say that a plain JMS consumer cannot be pooled/managed like an EJB unless that JMS consumer happens to be managed by containers like EJB or Spring containers.
A2. MDBs really just fulfills the requirement for asynchronous communication with EJBs. When they are JMS based then your MDB is technically a JMS Consumer as well. But an MDB can be non-JMS based as well eg: JCA (Java Connector Architecture) based MDB. You can see this post for more details about non-JMS based MDB: http://debupanda.blogspot.com/2006/08/using-ejb-30-message-driven-bean-with.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With