• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Please clarify

 
Ramakrishna Allam
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The ______ is called by the EJB container when the entity bean is about to return to the pool of entity bean's, after a transaction has completed.
--- A Question from ejbCerificate.com ....
he says ejbPassivate() . But prior to ejbPassivate() , I think, ejbStore() gets called.Which is true?
 
Ramakrishna Allam
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
which is correct?
1.After every call to ejbStore() , ejbPassivate() gets called .
2.Before every call to ejbPassivate() , ejbStore() gets called.
Thanks in advance ,
Ramakrishna Allam ,
SCJP-95% , SCWCD - 96%
 
Joyce Lee
Ranch Hand
Posts: 1392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The ______ is called by the EJB container when the entity bean is about to return to the pool of entity bean's, after a transaction has completed.

The hint for this question is "...after a transaction has completed".
ejbPassivate() is correct because it is invoked with an unspecified transaction context. Refer to spec 176. ejbStore() is invoked within a transaction context. And ejbStore may not be invoked when the entity bean is about to return to the pool if there is no transaction. Refer to spec 177 under ejbStore().
Joyce
 
Ramakrishna Allam
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Beautiful explonation . Thanks Joyce ...
I am yet to go thru EJB spec for entity beans..
Thanks in advance ,
Ramakrishna Allam ,
SCJP-95% , SCWCD - 96%
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic