Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Server Crash

 
Nesan Krish
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the server crashed or restarted, will the state of the session bean definitely lost or that depend on the server vendor? (But I guess that the HTTP Session-when using servlets- may survive after restart depend on the server vendor) Thank you.
 
Matt Lewis
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It very much depends. Typically, all state will be lost when the server crashes. It is possible to replicate session state across chosen primary and secondary nodes. In this scenario, if the server went down in the middle of an operation, that operation would be lost. This is dependent on a clustered environment in which a managed server goes down, but the other managed servers stay active.

It is also possible to use the ejbActivate and ejbPassivate methods of a stateful session bean to write session state out to persistent storage. This allows some form of recovery.

Typically, if you wish to survive a server crash, entity beans are used or a custom solution provided, as state must be written to persistent storage
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic