• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ejbRemove calling ejbPassivation

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
session beans:
a call to remove a passivated bean will NOT invoke ejbActivate().
HFEJB - question 7 page 253
Entity beans:
a call to remove a passivated bean will invoke ejbActivate().
HFEJB - question 16 page 371
Just want to confirm that the above summary is accurate.
- walk rustin
 
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Walker, I think you are right.
But ejbActivate() and ejbPassivate() mean different things for
SFSB and Entity beans.
ejbActivate()/ejbPassivate() for SFSB involves serialization/deserialiation of the bean's state to a flat file to conserve resources, while Entity bean's ejbActivate()/ejbPassivate() involves the bean coming out the bean instance pool and going back to the pool ...
...IMO, comparing them conceptually could be confusing sometimes.
 
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Remember for entity beans you cannot really remove a bean. the question actually states "when invoking ejbRemove()". This means that if the row is already not loaded into an bean instance then the container has to first load the data into a bean from the pool and this wud require calling ejbActivate and ejbLoad. Also the question says "might". If it wud have said "must" then none of the answer choices wud have sufficed.
Please see this post for a further discussion on this topic
https://coderanch.com/t/158574/java-EJB-SCBCD/certification/Additional-methods-which-might-called
 
I knew that guy would be trouble! Thanks tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic