Explain Stateful session bean life cycle?

Answer Posted / srinivas

* A stateless session bean instance’s life starts when
the container invokes newInstance() on the session bean
class to create a new instance. Next, the container calls
setSessionContext() followed by ejbCreate() on the instance.
The container can perform the instance creation at any
time—there is NO relationship to a client’s invocation of
the create() method.
* The session bean instance is now ready to be
delegated a business method call from any client.
* When the container no longer needs the instance
(usually when the container wants to reduce the number of
instances in the method-ready pool), the container invokes
ejbRemove() on it. This ends the life of the stateless
session bean instance.

Is This Answer Correct ?    4 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you understand by annotation in ejb to do the database entity relationships/mappings with examples?

556


What is the purpose of ejb in java?

533


When was ejb developed?

566


What do you mean by ejb ql?

567


What is the difference between message driven beans and stateless session beans?

515






Can beans who are involved in transaction have 'passivation' process?

534


What do you mean by ‘hot deployment’ ?

584


What is session facade in ejb?

550


What is an entity and its types?

544


What optimization could I use if the ejb container is the only point of write access to the database?

564


What is passivation and activation in ejb?

531


What are the various types of entrepreneur java bean?

521


How many ejb objects are created for a bean?

538


What is entity bean in ejb?

548


What is ejb and its types?

510