Re: ejbLoad, ejbStore calls for CMP entity bean.
Posted By:
Cherian_Mathew
Posted On:
Wednesday, September 10, 2003 10:41 PM
Calling ejbStore() will cause the container to call the ejbPassivate() which will clear all the resources used at that point of time. You can have some custom codes in ejbPassivate() for eg. to close some database connection. ejbLoad() will make the contiainer to call ejbActivate() method which will update all the persistence fields and all the non-persistence fields will have garbage values. You cannot directly call ejbPassivate() and ejbAcitivate(). But still it depends on vendor.
For an CMP Bean, you dont have worry about these things. Everything is inbuild.
You have to use ejbPassivate() and ejbActivate() in Sateful Session Bean(SSB) only. These are there in Entity beans, but it is the inside part. The latter methods will have some meaning only when you use it in SSB.
Regards,
Cherry
Re: ejbLoad, ejbStore calls for CMP entity bean.
Posted By:
dipankar_datta
Posted On:
Wednesday, September 10, 2003 04:35 AM
ejbRemove will be called when you call remove()on remote/local interface.
Calling ejbLoad/ejbStore depends on vendor but typically it will be once per transaction ie ejbload at begaining & ejbstore at end.