Describe the life cycle of a stateful session bean.
Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.
Describe the life cycle of a stateful session bean.
Rating:
The life cycle of a stateful session bean is shown in the following image:

A stateful session bean can have three states during its life as follows:
- Does not exist
- Method ready
- Passivated
The bean instance moves from the method ready to the passivated state when the container calls the ejbPassivate() method. The container does this to release resources when the bean instance is not in use. The container can move the bean instance back to the method ready state by calling the ejbActivate() method.
From the passivated state, the instance can move directly to the does not exist state due to the following reasons:
- The timeout occurs in the passivated state.
- The bean instance throws a system exception.
- The system crashes.
Rating:
Was this information helpful?
Other articles
- What is NoSuchObjectException?
- What is a local component interface?
- Skills required for Sun test 310-090
- What is the SELECT clause in the EJB query language?
- What are the responsibilities of a deployer in implementing security in EJB?