Life Cycle of an Entity EJB

Figure 12.1 shows the three stages in the life cycle of an entity bean: creation, process operations, and termination.

Figure 12.1. Life cycle of an entity bean.

Creation

An entity bean's life cycle varies from the life cycle of a session bean in some respects. This is because entity beans represent persistent data while session beans contain transient data. That's why an entity bean can come into existence in two different ways:

  • the result of a client application that calls the create() method in the home interface of the entity bean. In this case, the EJB container invokes the ejbCreate() method of the entity bean ...

Get Sams Teach Yourself BEA WebLogic Server 7.0™ 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.