• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HF Mock Exam Q No. :13(Session Bean Life cycle)

 
ShivPrakash Srivastava
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In what case(s) the container faile to call the ejbRemove method on a session Bean

a) If the container crashes
b) If the application Exception is thrown from the business method
c) If timeout occurs while the bean is in ready state
d) If the application exception is thrown from within a transaction

The correct answer is A but why not C.

If the bean timeout then the container will remove the bean without calling ejbRemove()

Regards
Shiv
 
Prashant Neginahal
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Only A is correct. If bean(stateful) is passivated and time out occures, then ONLY ejbRemove() wount be called.
 
ShivPrakash Srivastava
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

But what happens when the bean is in ready state and times out,will the container still call the ejbRemove() method?

Regards
Shiv
 
sawan parihar
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But what happens when the bean is in ready state and times out,will the container still call the ejbRemove() method


Yes in ready state the container will call ejbRemove if it times out.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic