• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

entity bean remote&home survive crash

 
JF Tordella
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
p133 2.1 spec: top:
How can a reference to a home and component interface survive a JVM crash?

How does the container manage it?
 
Kathy Sierra
Cowgirl and Author
Rancher
Posts: 1589
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This part is kind of confusing. It means that since the ENTITY itself is not affected by a server crash, the home and remote will be "re-creatable by the server". In other words, the objects themselves do not survive, but can be recreated by the server when the server restarts, since the entity itself is *presumably* still in the persistent store.
Now, somewhere in the spec it *does* say that even though an entity *survives* a server crash does NOT mean that this is transparent to the client. The client *might* have to restablish the home lookup, call create(), etc. The references the client is holding may not work -- but they're 100% re-establishable as long as the entity is still in the database. Remember, if the client gets back a reference to a CustomerHome and a reference to a Customer entity for Fred Smith #42, it will make no difference that the actual objects involved are all completely different from the ones the client had before the crash. They are conceptually identical.
Same thing with stateless session beans. But of course stateFUL beans won't work, because there is nothing that persists the state of the stateFUL bean, or its EJB object, so the client is just screwed if the server crashes with a stateful bean (although there *are* some servers that *will* do some kind of failover with stateful beans by caching them or something, but this is NOT in the spec or any sort of a guarantee).
cheers,
Kathy
 
JF Tordella
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are correct that the spec seems to be confusing in the way the concept is stated.
I thought that the data in support of the Entity was the focus of the recreatable Home or Local or Remote.
Thanks for the clarification.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic