This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Stateful session bean pooling? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Stateful session bean pooling?" Watch "Stateful session bean pooling?" New topic
Author

Stateful session bean pooling?

Ashish Jain
Ranch Hand

Joined: Sep 23, 2000
Posts: 50
"Stateful Session beans do not participate in instance pooling but rather the container may choose to evict a stateful Session bean from memory to conserve resources. The bean is passivated (i.e. has it�s �state� serialized to disk) and disassociated with the EJB Object. The client is completely unaware of this performance move on the part of the container. When the client invokes another method on the EJBObject, a new instance is created and populated with the passivated state (called �activation�)."
I am little confused here. When container passivate the STATEFUL session bean, wht happens to that bean. Does it get removed from memory at all or it's initializes state is being reused?
any clarifications plz?
ashish


Ashish Jain<br />MCP, SJCP, IBM XML, SCEA
Vishwa Kumba
Ranch Hand

Joined: Aug 27, 2003
Posts: 1064
I guess that depends on the vendor implementation...and the EJB specs does not say much. In most cases, I guess the bean is still in the memory, in a pooled state. It is evicted out from memory, when the bean times in the passivatd state.
mukesh singhania
Greenhorn

Joined: Dec 30, 2003
Posts: 2
according to EJB specification once a stateful been is passivated, bean instance is removed from memory, a new instance is created and used to activate and serve another request. As bean is stateful, state is maintained and same instance can not be used for other requests.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Stateful session bean pooling?
 
Similar Threads
State of Stateful Session Beans
Session bean instance variables ready for passivation
Regarding Stateful Session Bean!!
Pooling vs Instance Caches
stateful bean can be pooled or not?