The getEJBLocalObject() method is used to obtain a reference to the EJB local object that is currently associated with the instance and can only be called by an instance of an entity enterprise Bean. The instance must be associated with an EJB local object identity, i.e. in the ejbActivate, ejbPassivate, ejbPostCreate, ejbRemove, ejbLoad, ejbStore, and business methods. An instance can use this method when it wants to pass a reference to itself in a method argument or a result. The general format of this method is as follows:
public EJBLocalObject getEJBLocalObject() throws java.lang.IllegalStateException
Responses to “What is getEJBLocalObject() method?”