Name

EJBObject

Synopsis

This interface is the base interface for all remote interfaces for enterprise JavaBeans. When clients acquire a remote reference to an EJB object, they are given an instance of the EJBObject interface as a stub. If you develop an enterprise JavaBean, you must provide a remote interface for it by extending the EJBObject interface. In the remote interface for your EJB object type, you specify the business methods on your bean that will be accessible by remote clients.

The EJBObject interface provides methods that allow a client to query the bean’s home interface, get a portable handle for the remote bean, get the primary key for the bean (if it is an entity bean), compare the bean for equality with another bean, and remove the client’s reference to the bean.

                  Returned By
public interface EJBObject extends java.rmi.Remote {
// Public Instance Methods
   public abstract EJBHome getEJBHome(
        ) throws java.rmi.RemoteException;  
   public abstract Handle getHandle(
        ) throws java.rmi.RemoteException;  
   public abstract Object getPrimaryKey(
        ) throws java.rmi.RemoteException;  
   public abstract boolean isIdentical(
        EJBObject obj) throws java.rmi.RemoteException;  
   public abstract void remove(
        ) throws java.rmi.RemoteException, RemoveException;  
}

Passed To

EJBObject.isIdentical(), javax.ejb.spi.HandleDelegate.writeEJBObject()

Returned By

EntityContext.getEJBObject(), Handle.getEJBObject(), SessionContext.getEJBObject() ...

Get Java Enterprise in a Nutshell, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.