• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

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
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic