Originally posted by Parvathi G:
Hi,
So, the remove method in both home and remote interfaces calls the bean.ejbRemove() method to destroy the reference of the bean.
Then which remove() mtd we have to choose, home.remove() or remote.remove()()( apart of statless bean and local clients).
Thanks & Regards,
Parvathi.
both in stateful and entity beans what happens at the back is different things.ejbRemove() itself does not destroy anything.we need to implement code to do the needful like removing/closing references/connections etc.
as for as which remove() depends on what you have.if you just have the remote object reference(EJBobject) then call EJBObject.remove() else if you have home and the handle/primarykey then use the home to remove.
in fact you can use either one to remove the
same bean.
Remember the entity remove and stateful remove results in different things happening at the back.
[ November 03, 2006: Message edited by: Rajan Murugan ]