Alex Rivera | Logout

Difference between MDB and JMS

Asked 2011-01-15T13:35:38.060
9

Please let me know what is the difference between:

Edit
Report

1 Answer

13

JMS and Message-driven beans are not either/or choice, the two are complimentary.

JMS is the API and technology for passing messages around. Message-driven beans (MDB) are an API for receiving JMS messages as events in the EJB style. There are many ways of handling JMS messages, MDB is just one of them.

From the JavaEE tutorial:

Message-driven beans can implement any messaging type. Most commonly, they implement the Java Message Service (JMS) technology.

Your subject, by the way, talks abut MBeans - this is entirely different (that refers to the JMX API), and nothing to do with JMS.

answered 2011-01-15T13:39:26.783

Your Answer