O'Reilly logo

Sams Teach Yourself J2EE™ in 21 Days by Peter Roxburgh, Andy Longshaw, Debbie Law, Dan Haywood, Martin Bond

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Life Cycle of a Message-Driven Bean

The EJB container controls the lifecycle of a Message-driven bean. The Message-driven bean instance lifecycle has three states, as shown in Figure 10.1:

  • Does Not Exist— The Message-driven bean has not been instantiated yet or is awaiting garbage collection.

  • Method Ready Pool— A pool of Message-driven bean instances, similar to the instance pool used for stateless session beans.

  • Processing a message— The Message-driven bean has been instantiated and is handling a message.

Figure 10.1. The Message-driven bean life cycle.

After constructing the new instance of the Message-driven bean object, the container invokes ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required