This week's book giveaway is in the Agile and Other Processes forum. We're giving away four copies of Darcy DeClute's Scrum Master Certification Guide: The Definitive Resource for Passing the CSM and PSM Exams and have Darcy DeClute on-line! See this thread for details.
If you look at both EJBHome and EJBObject api you can see that both the interface removes the EJB instance. From home interface you remove the instance by passing the handle of the EJB instance. One difference you need to know is both these interface cannot remove the stateless bean.
Client has access to only those interface you mentioned by its implemented classes. Using those he can do some action on bean and remove() method is from only from EJBHome and EJBObject,EJBLocalHome and EJBLocalObject interfaces.
So, client can only call remove() from Home and Component Interface. One more way bean can be removed is, if System Exception or Uncaught exception is thrown.
Needless to say, you have to invoke remove() on EJBObject (or EJBLocalObject) interface. But, the consequence is, 1. The actual bean is removed if its stateful bean 2. The acutal bean is sent to pool, if its a stateless bean.
sunglasses are a type of coolness prosthetic. Check out the sunglasses on this tiny ad:
a bit of art, as a gift, the permaculture playing cards