• Post Reply Bookmark Topic Watch Topic
  • New Topic

Passivation

 
Karthik Vaidiswaran
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found this in jGuru- EJB Tutorials

In stateful beans, passivation means the bean's conversational-state is written to a secondary storage (often disk) and the instance is removed from memory

To my understanding, removal of bean instance from memory should be done by the remove() method. Does passivation call the remove() method?
Please clarify this.


Thanks
Karthik
 
Valentin Tanase
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Karthik

A SFSB could be moved out of the Method-Ready state in two ways: by removing the bean and going to the Does Not Exist state, or via passivation going to the Passivated state. When the clients chouse to remove the bean, that�s it the bean is removed from cache the ejbRemove() method is invoked and the bean is gone. As for passivating/removing SFSB probably different container have different strategies. WebLogic forexample maintains a cache of SFSB that has either a LRU (eager passivation) or NRU (lazy passivation) algorithm. Depending on the passivation algorithm chousen the container might first passivate the bean and remove it from the disk after exceeding the idle-timeout-seconds in the passivated state (LRU), or it might remove the bean directly (without passivating it!) if the bean exceeds the idle-timeout-seconds (NRU).
Regards.
 
Karthik Vaidiswaran
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Valentin Tanase

Thanks for the reply

Thanks
Karthik
 
Valentin Tanase
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're very welcome Karthik
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!