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?
Hi Van, A bean doing an ejbRemove() method will NOT be passivated before going back to the pool!! See HFE p.321. Regards, Cyril.
SCJP 1.4, SCWCD, SCBCD, IBM XML, IBM Websphere 285, IBM Websphere 287
posted 16 years ago
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
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: