org.objectweb.jonas.jtests.beans.message
Class MRecordEC

org.objectweb.jonas.jtests.beans.message.MRecordEC

public class MRecordEC


Field Summary
 java.lang.String dest
           
protected static org.objectweb.util.monolog.api.Logger logger
           
 java.lang.String mdb
           
 java.lang.String uuid
           
 int value
           
 
Constructor Summary
MRecordEC()
           
 
Method Summary
 void ejbActivate()
          A container invokes this method when the instance is taken out of the pool of available instances to become associated with a specific EJB object.
 MRecordPK ejbCreate(java.lang.String uuid, java.lang.String dest, int value, java.lang.String mdb)
          The Entity bean can define 0 or more ejbCreate methods.
 void ejbLoad()
          A container invokes this method to instruct the instance to synchronize its state by loading it state from the underlying database.
 void ejbPassivate()
          A container invokes this method on an instance before the instance becomes disassociated with a specific EJB object.
 void ejbPostCreate(java.lang.String uuid, java.lang.String dest, int value, java.lang.String mdb)
          There must be an ejbPostCreate par ejbCreate method
 void ejbRemove()
          A container invokes this method before it removes the EJB object that is currently associated with the instance.
 void ejbStore()
          A container invokes this method to instruct the instance to synchronize its state by storing it to the underlying database.
 java.lang.String getDest()
          returns dest
 java.lang.String getMDB()
          returns MDB
 java.lang.String getUUID()
          returns UUID
 int getValue()
          returns value
 void setEntityContext(javax.ejb.EntityContext ctx)
          Set the associated entity context.
 void unsetEntityContext()
          Unset the associated entity context.
 

Field Detail

logger

protected static org.objectweb.util.monolog.api.Logger logger

uuid

public java.lang.String uuid

dest

public java.lang.String dest

value

public int value

mdb

public java.lang.String mdb
Constructor Detail

MRecordEC

public MRecordEC()
Method Detail

setEntityContext

public void setEntityContext(javax.ejb.EntityContext ctx)
Set the associated entity context. The container invokes this method on an instance after the instance has been created. This method is called in an unspecified transaction context.
Parameters:
ctx - - An EntityContext interface for the instance. The instance should store the reference to the context in an instance variable.
Throws:
EJBException - Thrown by the method to indicate a failure caused by a system-level error.

unsetEntityContext

public void unsetEntityContext()
Unset the associated entity context. The container calls this method before removing the instance. This is the last method that the container invokes on the instance. The Java garbage collector will eventually invoke the finalize() method on the instance. This method is called in an unspecified transaction context.
Throws:
EJBException - Thrown by the method to indicate a failure caused by a system-level error.

ejbRemove

public void ejbRemove()
               throws javax.ejb.RemoveException
A container invokes this method before it removes the EJB object that is currently associated with the instance. This method is invoked when a client invokes a remove operation on the enterprise Bean's home interface or the EJB object's remote interface. This method transitions the instance from the ready state to the pool of available instances. This method is called in the transaction context of the remove operation.
Throws:
RemoveException - The enterprise Bean does not allow destruction of the object.
EJBException - - Thrown by the method to indicate a failure caused by a system-level error.

ejbLoad

public void ejbLoad()
A container invokes this method to instruct the instance to synchronize its state by loading it state from the underlying database. This method always executes in the proper transaction context.
Throws:
EJBException - Thrown by the method to indicate a failure caused by a system-level error.

ejbStore

public void ejbStore()
A container invokes this method to instruct the instance to synchronize its state by storing it to the underlying database. This method always executes in the proper transaction context.
Throws:
EJBException - Thrown by the method to indicate a failure caused by a system-level error.

ejbPostCreate

public void ejbPostCreate(java.lang.String uuid,
                          java.lang.String dest,
                          int value,
                          java.lang.String mdb)
                   throws javax.ejb.CreateException
There must be an ejbPostCreate par ejbCreate method
Throws:
CreateException - Failure to create an entity EJB object.

ejbCreate

public MRecordPK ejbCreate(java.lang.String uuid,
                           java.lang.String dest,
                           int value,
                           java.lang.String mdb)
                    throws javax.ejb.CreateException,
                           javax.ejb.DuplicateKeyException
The Entity bean can define 0 or more ejbCreate methods.
Throws:
CreateException - Failure to create an entity EJB object.
DuplicateKeyException - An object with the same key already exists.

ejbPassivate

public void ejbPassivate()
A container invokes this method on an instance before the instance becomes disassociated with a specific EJB object.

ejbActivate

public void ejbActivate()
A container invokes this method when the instance is taken out of the pool of available instances to become associated with a specific EJB object.

getUUID

public java.lang.String getUUID()
                         throws java.rmi.RemoteException
returns UUID

getDest

public java.lang.String getDest()
                         throws java.rmi.RemoteException
returns dest

getValue

public int getValue()
             throws java.rmi.RemoteException
returns value

getMDB

public java.lang.String getMDB()
                        throws java.rmi.RemoteException
returns MDB