Entity Bean Life Cycle

The life cycle of an entity bean uses essentially the same concepts as those discussed in Chapter 12 concerning the session bean life cycle, although the details differ somewhat. There are a couple of main differences to highlight.

The first is that the EJB container plays a role in initially creating a pool of instances for each entity bean you deploy. The size and behavior of the pool is controlled by various server settings. At this point, the Home interface for the EJB exists, so it is possible for home or finder methods to be called. Instances remain in this state until they are created or activated, either by the client or the EJB container.

The second point to note is that several of the state transitions an entity ...

Get Developing Enterprise Java Applications with J2EE™ and UML 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.