Show TOC Start of Content Area

Procedure documentation Consuming Messages from Message-Driven Beans  Locate the document in its SAP Library structure

Use

The message driven-beans (MDBs) are Enterprise JavaBeans whose purpose is to provide business logic which is triggered asynchronously, for example by a JMS messages. If an MDB is to be triggered by a JMS message, it has to implement the javax.jms.MessageListener interface. The only method in this interface is the onMessage() method, which is passed a JMS message as a parameter and contains the business logic of the MDB.

Note

Note that MDBs provide the easiest way to consume JMS messages because all the messaging specifics such as creating connections, sessions, consumers and so on, are transparent to MDB applications.

More information about the general usage and life cycle of message-driven beans: EJB Overview

Procedure

...

       1.      You create an MDB.

More information: Creating Message-Driven Beans

       2.      You implement the MDB’s onMessage() method.

       3.      You set the required properties of the <bean-props> tag in the ejb-j2ee-engine.xml that concern the message-driven beans.

More information: Editing the ejb-j2ee-engine.xml

More information

Developing a Message-Driven Bean Application

End of Content Area