O'Reilly logo

Java EE Development with Eclipse - Second Edition by Ram Kulkarni

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

Consuming JMS messages using MDB

Message-driven beans (MDBs) make consuming JMS messages a lot easier. With just a couple of annotations and implementing the onMessage method, you can make any Java object a consumer of the JMS messages. In this section, we will implement an MDB to consume messages from the Course queue. To implement MDB, we need to create an EJB project. Select File | New | EJB Project from the main menu.

Consuming JMS messages using MDB

Figure 10.9 Create EJB project to implement MDB

Enter Project name as CourseManagementEJB. Click Next. Accept the default values on the subsequent pages, and click Finish on the last page.

Right-click on the project, and select the ...

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