Name
EntityBean
Synopsis
This interface is the base interface for all entity EJB objects. The
methods defined on the EntityBean
interface are used by EJB containers
to notify the entity bean about entity-specific events, such as the
need to (re)load its state from persistent storage.
The ejbActivate()
and ejbPassivate()
methods are called on the bean by
the container when the bean is associated and disassociated with a
specific entity, respectively. The ejbLoad()
and ejbStore()
methods
are called when the entity bean needs to read and write its persistent
state, respectively. The ejbRemove()
method is called when the entity
associated with this bean should be removed from persistent
storage. When the container sets the entity bean’s context, it calls
the setEntityContext()
method, and it removes the association with a
given context by calling the unsetEntityContext()
method.
public interface EntityBean extends EnterpriseBean { // Public Instance Methods public abstract void ejbActivate( ) throws EJBException, java.rmi.RemoteException; public abstract void ejbLoad( ) throws EJBException, java.rmi.RemoteException; public abstract void ejbPassivate( ) throws EJBException, java.rmi.RemoteException; public abstract void ejbRemove( ) throws RemoveExceptionEJBException, java.rmi.RemoteException; public abstract void ejbStore( ) throws EJBException, java.rmi.RemoteException; public abstract ...
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.