• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Please clarify

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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%
 
Ranch Hand
Posts: 1392
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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%
reply
    Bookmark Topic Watch Topic
  • New Topic