• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Life of Entity beans

 
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Entity Beans survive critical failures like App server Crashing and Database Crashing".Please comment on it
Thanks
Vikas
 
vikasids sharma
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
While Entity bean is in transaction, and appserver crashes before appserver calls ejbStore()to persist data in persistence storage.
In that case how can we say entity bean survives crashes as modifications has not been updated in persistence storage? No doubt we would be able to load fresh data with new entity bean instance as soon as appserver revives again.
Similarly when database crashes while we are modifying any entity bean.
What do we really mean by "entity bean survives"?
thanks
Vikas
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As per J2EE guidelines:
If the state of an entity bean is being updated by a transaction at the time of server crash, the entity bean's state is automatically reset to the state of the last committed transaction.
So in any case (Appserver or DBServer crashes), the transaction is rollbacked but bean itself is not destroyed and a client can later connect to the same Entity Bean using its object reference.
 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Kapil is right.
 
vikasids sharma
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By saying that "a client can later connect to same Entity bean" do we mean state of previous instance is still managed ?

Originally posted by kapil Gupta:
As per J2EE guidelines:
If the state of an entity bean is being updated by a transaction at the time of server crash, the entity bean's state is automatically reset to the state of the last committed transaction.
So in any case (Appserver or DBServer crashes), the transaction is rollbacked but bean itself is not destroyed and a client can later connect to the same Entity Bean using its object reference.

 
Author
Posts: 234
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can 'reconnect' to the bean via its reference but it will be the state of the last committed transaction.
 
reply
    Bookmark Topic Watch Topic
  • New Topic