This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Kubernetes in Action and have Marko Luksa on-line!
See this thread for details.
Win a copy of Kubernetes in Action this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

a mock question  RSS feed

 
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
27. Which will survive an EJB server crash? (choose all that
apply)
A) Stateful session bean instances
B) Stateless session bean instances
C) Message-driven bean instances
D) An entity bean's primary key
E) An entity
the answer is d,
but i think the answer is d,e
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

From the spec page no:48
The entity, its primary key, and its remote reference survive the crash of the EJB Container. If the state of an entity was being updated by a transaction at the time the container crashed, the entity�s state is automatically reset to the state of the last committed transaction. The crash is not fully transparent to the client�the client may receive an exception if it calls an entity in a container that has experienced a crash.



So, I too think, the answer is d,e
 
Ranch Hand
Posts: 341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Once the client terminates, the session Bean terminates. In case of an EJB server crash, all session Beans are destroyed. But, Entity beans can survive EJB server crashes. Any EJB server crash is always transparent to the client.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!