O'Reilly logo

J2EE™ and Beyond: Design, Develop, and Deploy World-Class Java™ Software by Art Taylor

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Message-Driven Beans

MDBs are a new addition to J2EE. As mentioned previously, these beans provide a mechanism for providing a messaging server within the application server using EJB components. Prior to the inclusion of MDBs in the J2EE specification, application server vendors provided their own messaging services. While having a messaging service available was useful, what was really needed was a facility to perform messaging processing in the context of the EJB container. MDBs provide that capability using the JMS package interface.

The following code provides an example of a minimal implementation of an MDB. The client application creates a message, locates the message queue, and then sends the message. The server component, the MDB, is ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required