University of Cincinnati logo and link  
The Home Interface
 
  UC ingot The home interface has methods to client to create, find, and remove EJB objects.  It is implemented by a class generated by the EJB container.
    • It extends javax.ejb.EJBHome, which has two remove method signatures and two other methods.
    • create gives us a reference to an EJB object.
    • As we might expect, the create method throws a RemoteException. But it also throws a CreateException,  which is thrown when an EJB object cannot be created.
public interface HelloHome extends javax.ejb.EJBHome {
      Hello create() throws java.rmi.RemoteException, javax.ejb.CreateException;
}
 
  • The home interface has a local counterpart, too: the local home interface.  The differences are similar as well.  Local home implements EJBLocalHome, and the create method does not throw a RemoteException.
public interface HelloLocalHome extends javax.ejb.EJBLocalHome {
     HelloLocal create() throws javax.ejb.CreateException;
}

 The Bean Class