• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

entity bean remote&home survive crash

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?
Cowgirl and Author
Posts: 1589
  • 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).
JF Tordella
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.
Think of how stupid the average person is. And how half of them are stupider than that. But who reads this tiny ad?
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic