Consuming messages with an MDB

The last thing we must do to complete our business scenario is to retrieve the posted messages from the queue and create a new exhibition line in the database by using the persistence layer. To do so, follow these steps:

  1. Right-click on the Theater project's name, select New… in the top of the context menu, and then select Other….
  2. Type Message in the search field, select the Message-Driven Bean (EJB 3.x) entry, and click on Next.
  3. Configure the fields as shown in the following screenshot:
    Consuming messages with an MDB
  4. Click on Finish.

As a message carries an instance of class Exhibition, we will just extract and pass it to a persistence manager that will ...

Get Getting Started with Oracle WebLogic Server 12c: Developer's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.