"Entity Beans survive critical failures like App server Crashing and Database Crashing".Please comment on it Thanks Vikas
Thanks
Vikas Sharma
SCJP(1.4)
vikasids sharma
Ranch Hand
Joined: Aug 01, 2003
Posts: 157
posted
0
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
kapil Gupta
Greenhorn
Joined: Jan 31, 2002
Posts: 9
posted
0
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.
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.
Bill Dudney
Author
Ranch Hand
Joined: Sep 05, 2003
Posts: 234
posted
0
You can 'reconnect' to the bean via its reference but it will be the state of the last committed transaction.