Life Cycle of an Entity Bean

Figure 8.5 shows a simplified state diagram of an entity bean instance.

Figure 8.5. Simplified life cycle of an entity bean instance.

The following paragraphs describe the life cycle of an entity bean instance.

Initially, the bean instance does not exist.

Your bean instance's life cycle starts when the container creates the instance using Class.newInstance() and then calls the setEntityContext method. Now the instance enters a pool of available instances. An instance in the pooled state is not associated with any particular entity object identity. All instances in the pooled state are identical. While the instance is ...

Get Sams Teach Yourself EJB in 21 Days 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.