org.apache.openejb.test.entity.cmp
Class ContextLookupCmpBean

java.lang.Object
  extended by org.apache.openejb.test.entity.cmp.ContextLookupCmpBean
All Implemented Interfaces:
Serializable, javax.ejb.EnterpriseBean, javax.ejb.EntityBean

public class ContextLookupCmpBean
extends Object
implements javax.ejb.EntityBean

Author:
David Blevins, Richard Monson-Haefel
See Also:
Serialized Form

Field Summary
 javax.ejb.EntityContext ejbContext
           
 String firstName
           
 String lastName
           
 int primaryKey
           
 
Constructor Summary
ContextLookupCmpBean()
           
 
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.
 Integer ejbCreate(String name)
          Maps to EncCmpHome.create
 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(String name)
           
 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.
 void lookupBooleanEntry()
           
 void lookupByteEntry()
           
 void lookupCharacterEntry()
           
 void lookupDoubleEntry()
           
 void lookupEntityBean()
           
 void lookupFloatEntry()
           
 void lookupIntegerEntry()
           
 void lookupJMSConnectionFactory()
           
 void lookupLongEntry()
           
 void lookupPersistenceContext()
           
 void lookupPersistenceUnit()
           
 void lookupResource()
           
 void lookupShortEntry()
           
 void lookupStatefulBean()
           
 void lookupStatefulBusinessLocal()
           
 void lookupStatefulBusinessRemote()
           
 void lookupStatelessBean()
           
 void lookupStatelessBusinessLocal()
           
 void lookupStatelessBusinessRemote()
           
 void lookupStringEntry()
           
 void setEntityContext(javax.ejb.EntityContext ctx)
          Set the associated entity context.
 void unsetEntityContext()
          Unset the associated entity context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

primaryKey

public int primaryKey

firstName

public String firstName

lastName

public String lastName

ejbContext

public javax.ejb.EntityContext ejbContext
Constructor Detail

ContextLookupCmpBean

public ContextLookupCmpBean()
Method Detail

ejbCreate

public Integer ejbCreate(String name)
                  throws javax.ejb.CreateException
Maps to EncCmpHome.create

Parameters:
name -
Returns:
Throws:
javax.ejb.CreateException
See Also:
EncCmpHome.create(java.lang.String)

ejbPostCreate

public void ejbPostCreate(String name)
                   throws javax.ejb.CreateException
Throws:
javax.ejb.CreateException

lookupEntityBean

public void lookupEntityBean()
                      throws TestFailureException
Throws:
TestFailureException

lookupStatefulBean

public void lookupStatefulBean()
                        throws TestFailureException
Throws:
TestFailureException

lookupStatelessBean

public void lookupStatelessBean()
                         throws TestFailureException
Throws:
TestFailureException

lookupStatelessBusinessLocal

public void lookupStatelessBusinessLocal()
                                  throws TestFailureException
Throws:
TestFailureException

lookupStatelessBusinessRemote

public void lookupStatelessBusinessRemote()
                                   throws TestFailureException
Throws:
TestFailureException

lookupStatefulBusinessLocal

public void lookupStatefulBusinessLocal()
                                 throws TestFailureException
Throws:
TestFailureException

lookupStatefulBusinessRemote

public void lookupStatefulBusinessRemote()
                                  throws TestFailureException
Throws:
TestFailureException

lookupStringEntry

public void lookupStringEntry()
                       throws TestFailureException
Throws:
TestFailureException

lookupDoubleEntry

public void lookupDoubleEntry()
                       throws TestFailureException
Throws:
TestFailureException

lookupLongEntry

public void lookupLongEntry()
                     throws TestFailureException
Throws:
TestFailureException

lookupFloatEntry

public void lookupFloatEntry()
                      throws TestFailureException
Throws:
TestFailureException

lookupIntegerEntry

public void lookupIntegerEntry()
                        throws TestFailureException
Throws:
TestFailureException

lookupShortEntry

public void lookupShortEntry()
                      throws TestFailureException
Throws:
TestFailureException

lookupBooleanEntry

public void lookupBooleanEntry()
                        throws TestFailureException
Throws:
TestFailureException

lookupByteEntry

public void lookupByteEntry()
                     throws TestFailureException
Throws:
TestFailureException

lookupCharacterEntry

public void lookupCharacterEntry()
                          throws TestFailureException
Throws:
TestFailureException

lookupResource

public void lookupResource()
                    throws TestFailureException
Throws:
TestFailureException

lookupJMSConnectionFactory

public void lookupJMSConnectionFactory()
                                throws TestFailureException
Throws:
TestFailureException

lookupPersistenceUnit

public void lookupPersistenceUnit()
                           throws TestFailureException
Throws:
TestFailureException

lookupPersistenceContext

public void lookupPersistenceContext()
                              throws TestFailureException
Throws:
TestFailureException

ejbLoad

public void ejbLoad()
             throws javax.ejb.EJBException,
                    RemoteException
A container invokes this method to instruct the instance to synchronize its state by loading it state from the underlying database.

Specified by:
ejbLoad in interface javax.ejb.EntityBean
Throws:
javax.ejb.EJBException
RemoteException

setEntityContext

public void setEntityContext(javax.ejb.EntityContext ctx)
                      throws javax.ejb.EJBException,
                             RemoteException
Set the associated entity context. The container invokes this method on an instance after the instance has been created.

Specified by:
setEntityContext in interface javax.ejb.EntityBean
Throws:
javax.ejb.EJBException
RemoteException

unsetEntityContext

public void unsetEntityContext()
                        throws javax.ejb.EJBException,
                               RemoteException
Unset the associated entity context. The container calls this method before removing the instance.

Specified by:
unsetEntityContext in interface javax.ejb.EntityBean
Throws:
javax.ejb.EJBException
RemoteException

ejbStore

public void ejbStore()
              throws javax.ejb.EJBException,
                     RemoteException
A container invokes this method to instruct the instance to synchronize its state by storing it to the underlying database.

Specified by:
ejbStore in interface javax.ejb.EntityBean
Throws:
javax.ejb.EJBException
RemoteException

ejbRemove

public void ejbRemove()
               throws javax.ejb.RemoveException,
                      javax.ejb.EJBException,
                      RemoteException
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.

Specified by:
ejbRemove in interface javax.ejb.EntityBean
Throws:
javax.ejb.RemoveException
javax.ejb.EJBException
RemoteException

ejbActivate

public void ejbActivate()
                 throws javax.ejb.EJBException,
                        RemoteException
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. This method transitions the instance to the ready state.

Specified by:
ejbActivate in interface javax.ejb.EntityBean
Throws:
javax.ejb.EJBException
RemoteException

ejbPassivate

public void ejbPassivate()
                  throws javax.ejb.EJBException,
                         RemoteException
A container invokes this method on an instance before the instance becomes disassociated with a specific EJB object. After this method completes, the container will place the instance into the pool of available instances.

Specified by:
ejbPassivate in interface javax.ejb.EntityBean
Throws:
javax.ejb.EJBException
RemoteException


Copyright © 1999-2011 The Apache OpenEJB development community. All Rights Reserved.