How is Stateful Session bean maintain their states with client

Showing Answers 1 - 2 of 2 Answers

Srinivas Jadcharla

  • Jul 18th, 2005
 

A stateful session bean is an enterprise bean (EJB component) that acts as a server-side extension of the client that uses it. The stateful session bean is created by a client and will work for only that client until the client connection is dropped or the bean is explicitly removed.  
The stateful session bean is EJB component that implements the javax.ejb.SessionBean interface and is deployed with the declarative attribute "stateful". Stateful session beans are called "stateful" because they maintain a conversational state with the client. In other words, they have state or instance fields that can be initialized and changed by the client with each method invocation. The bean can use the conversational state as it process business methods invoked by the client.

  Was this answer useful?  Yes

Ravi Dalal

  • Sep 19th, 2005
 

stateful beans maintains their state through instance variables. the values of the instance variables is specific to client. when the bean instance needs to be removed from the pool (usually LRU replacement) , the state is passivated to secondary storage. or we can say object is serialized to secondary storage.

  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