Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • 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 ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Please clarify

 
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%
 
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%
 
BWA HA HA HA HA HA HA! Tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!