8.4 Message-driven beans

 

+

Search Tips   |   Advanced Search

 

The Enterprise JavaBeans specification (EJB) V2.0 introduced a new type of EJB called the message-driven bean (MDB). Message-driven beans are asynchronous message consumers that run within the context of an appservers EJB container. This enables the EJB container to provide additional services to the MDB during the processing of a message, such as transactions, security, concurrency, and message acknowledgement.

The EJB container is also responsible for managing the lifetime of the MDB and for invoking MDB when a message arrives for which a given MDB is the consumer.

MDB instances should not maintain any conversational state on behalf of a client. This enables the EJB container to maintain a pool of MDB instances and to select any instance from this pool to process an incoming message. However, this does not prevent a MDB from maintaining a state that is not specific to a client, for example, data source references or references to another EJB.

WAS V6 is fully compliant with V1.4 of the J2EE specification, which requires appservers to support V2.1 of the EJB specification.

Next