The Message-Driven Bean and the Container

From the message bean’s creation until its destruction, the container manages message-driven beans exclusively. All the services offered to the other two enterprise beans, such as security, transaction support, and concurrency, are also provided to the message-driven bean by the container.

The container interacts with the message-driven bean through a set of callback methods that are implemented in the message-driven bean. These callback methods are similar to the ones used by session and entity beans. The methods tell the bean instance when certain events are about to occur or have occurred.

The Message-Driven Bean Life Cycle

Figure 11.2 shows the life cycle for message-driven beans.

Figure 11.2. ...

Get Special Edition Using Enterprise JavaBeans™ 2.0 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.