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

Does Stateful Session Bean survive crash ?

 
Kartik Shah
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does stateful session bean survive server crash like entity bean
I tried to locate this in EJB1.1 Spec. But I couldn't find it.
Does the spec specifically says that Staeful session bean survive crash ?
Help me out
 
Mark Donaghue
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, it doesn't. In the blueprints book, it discusses that, for example. Are you sure it's not in the spec?
Mark
 
Madhu Juneja
Ranch Hand
Posts: 176
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Session Bean does not survive a crash. Refer Pages 39, 44, 47, 48 (diagram of life cycle), of the EJB 1.1 Specs.
 
Kartik Shah
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.
But I was looking specifically for Stateful Session Bean.
However, reasonable amount of argument can be placed to believe that session bean in spec means both type of session beans.
 
John Wetherbie
Rancher
Posts: 1449
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sun states in the spec that stateless session beans are a special case. Sun assumes that if it just says session bean it definitely covers stateful session beans.
As the other folks have said session beans don't survive crashes.
John
 
Sean MacLean
author
Ranch Hand
Posts: 621
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For further clairification, Ed Roman's Mastering EJB's discusses the concept of stateful beans and bean death (pg. 129). Basically, he comments on the fact that if you want to protect a persistant conversation you shoud keep conversations short and (if neccessary) 'check-point' (i.e. manually save the beans state) in case of a crash. He also make the very lucid observation that stateless bean don't give a darn about server crashes since they're client instantiation (that is the period in which they have variables initialized with client specific data) only exists for a single transaction. Therefore, there is no state to save in case of a system crash. Considering this, it doesn't matter which type of bean the specs are refering to in this particular instance.
Sean
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic