dcsimg
requirement of the getEJBHome method in interface javax.ejb.EJBObject<br>
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Vikramjit_Sandhu
Posted On:   Wednesday, October 31, 2001 09:09 PM

the interface javax.ejb.EJBObject supports a method
public abstract javax.ejb.EJBHome getEJBHome() throws java.rmi.RemoteException;


why does a remote interface which derive from interface javax.ejb.EJBObject need to have this method? according to the invocation a bean instance by a client it is the EJB Object which calls the remote interface(create method)..the remote interface never needs to call the Home Object

Re: requirement of the getEJBHome method in interface javax.ejb.EJBObject<br>

Posted By:   Bozidar_Dangubic  
Posted On:   Wednesday, October 31, 2001 11:07 PM

at times, your bean may need to get a reference to its home interface which is why this method is provided in EJBObject interface. remember that the only way to create, remove, find ... EJBs is through bean's home interface. A bean instance can use this method to create new beans of its own type or, for entity beans, find other bean entities of its own type. most beans will not need access to their EJB home, but if you need one, getEJBHome() provides a way to get it.
About | Sitemap | Contact