Chapter 9. Message Driven Bean(MDB)

Table of Contents

9.1. Overview
9.2. MDB Configuration
9.2.1. Configuring Basic Settings
9.2.2. Configuring JMS Settings
9.2.3. Configuring JNDI SPI

This chapter describes some precautions for using MDB (Message Driven Beans) in the JEUS engine.

The EJB engine concurrently executes multiple message driven bean instances. It can also process message streams. Since the EJB engine cannot guarantee the accuracy of the order in which messages arrive in the message driven bean class, it does not transmit the messages in the order they are received. Instead, it randomly selects a message to transmit.

MDB also does not guarantee the order of processing the requests. For example, since a message to cancel a reservation may arrive before the message to make a reservation, message processing order should be considered when designing the MDB.

Concurrency is processed when the bean pool obtains an Instance from MDB and delegate it to the request.. This is identical to the behavior of the TTP (Thread Ticket Pool) of stateless session beans. For MDB, a <pool-max> setting, instead of the <thread-max> setting, should be used. Refer to "Chapter 7. Session Bean".

Some MDB-specific configurations are required in order for the EJB engine to execute MDB beans. Other than the MDB-specific configurations, MDBs share some basic EJB settings with other JEUS bean types.

This section will very briefly discuss:

Note

These configurations should be self-explanatory for anyone familiar with MDB.

Different settings are required for different message types processed by MDB. The JMS connection factory export name is required to process JMS messages, and the resource adaptor is required to process connector messages.

The following is a section of the XML document that shows annotation settings of a MDB class .



Descriptions for each element are as follows: