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

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

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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


 
Good night. Drive safely. Here's a tiny ad for the road:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic