What is the life cycle of Stateless session bean

Showing Answers 1 - 2 of 2 Answers

Kiran

  • May 3rd, 2005
 

stateless session bean has only two states: Does Not Exists and Method Ready Pool. 
 
A bean has not yet instantiated (so it is not an instance in memory) when it is in the Does Not Exists state. 
 
When the EJB container needs one or more beans, it creates and set them in the Method Ready Pool state. This happens through the creation of a new instance (Class.newInstance()), then it is set its context (setSessionContext()) and finally calls the ejbCreate() method. 
 
The ejbRemove() method is called to move a bean from the Method Ready Pool back to Does Not Exists state.

  Was this answer useful?  Yes

pradeep

  • Jul 24th, 2005
 

1. dose not exsist 
2. exsist 
 
to start the session 
set the sessionContext() 
call create() 
 
to end session 
call remove

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions