O'Reilly logo

Web Technology: Theory and Practice by M. Srinivasan

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

7.6 LIFECYCLE OF AN EJ BEAN

The EJB container manages the lifecyle of a bean. The EJB container itself is in most cases a part of the Application Container, though it could be separate. For simplicity let us assume they are available in the same application server. Glassfish Java EE compliant Application Server comes with a Web Server, a Servlet container, an EJB container and a JPA provider.

The lifecycle depends on the type of the Bean. Let us consider the case for Stateless Session Bean, Stateful Session Bean and a Message driven Bean. Their states can simply be represented in Figure 7.2.

 

(A) Stateless session bean (B) Stateful session bean

 

Fig. 7.2 (A) Stateless session bean (B) Stateful ...

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