• 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
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

ejbRemove() doesn't call ejbPassivate() ? - HFE p371 question #16

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
16. Which additional method(s) might the container call when invoking ejbRemove?
e. ejbPassivate() - is not one of the answers. Why not?
My understanding is that after the container calls ejbActivate() - loads the data into the bean -calls ejbLoad() to tell the bean that it's been loaded. The bean/container deletes the entity in the db.
After this, doesn't the bean still exist? doesn't it go back into the pool so that it can be activated and loaded with another entities data? much like a stateless session bean? Thus I think ejbPassivate() may be called by the container.
If not the pool would shrink everytime an ejbRemove() is called.
Any thoughts?
 
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Van,
A bean doing an ejbRemove() method will NOT be passivated before going back to the pool!!
See HFE p.321.
Regards,
Cyril.
 
Van Nguyen
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi cyril,
thanks for the reply. I see the comment on p.321. I get it now. ejbRemove() brings it to pooled state. I was confused, I was assuming that ejbRemove() would bring it to "does not exist" state.
thanks very much for clearing that up for me.
-Van
 
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Van Nguyen:
thanks for the reply. I see the comment on p.321. I get it now. ejbRemove() brings it to pooled state. I was confused, I was assuming that ejbRemove() would bring it to "does not exist" state.
-Van


 
it's a teeny, tiny, wafer thin ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic