Life Cycle of Session Beans

Stateful and stateless session beans have different life cycles. The stages from the time they are instantiated, ready to be used, and then destroyed vary from one type to another. We will examine the life cycle of each stateless and stateful session bean in the following sections.

Stateless Session Bean Life Cycle

Figure 3.1 shows the life cycle of a stateless session bean instance. If you are not familiar with state diagrams, we recommend that you read Appendix D, “Introduction to UML Notation,” before you read this section.

Figure 3.1. Stateless session bean life cycle.

The following steps describe the life cycle ...

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.