The life cycle of a message-driven bean uses the same concepts used by other EJBs, and it is the simplest to describe. The EJB container initially creates a pool of instances for each message-driven bean you deploy. The size and behavior of the pool is controlled by various server settings. When a JMS message comes in, the EJB container simply dispatches the message to an available instance in the pool and calls the onMessage method. When that method completes, the instance goes back into the pool.
The state diagram in Figure 14-5 accurately shows this life cycle.
3.139.88.165