org.openejb.test.stateful
Class EncStatefulBean

java.lang.Object
  extended by org.openejb.test.stateful.EncStatefulBean
All Implemented Interfaces:
java.io.Serializable, javax.ejb.EnterpriseBean, javax.ejb.SessionBean, javax.ejb.SessionSynchronization

public class EncStatefulBean
extends java.lang.Object
implements javax.ejb.SessionBean, javax.ejb.SessionSynchronization

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

Constructor Summary
EncStatefulBean()
           
 
Method Summary
 void afterBegin()
          The afterBegin method notifies a session Bean instance that a new transaction has started, and that the subsequent business methods on the instance will be invoked in the context of the transaction.
 void afterCompletion(boolean committed)
          The afterCompletion method notifies a session Bean instance that a transaction commit protocol has completed, and tells the instance whether the transaction has been committed or rolled back.
 void beforeCompletion()
          The beforeCompletion method notifies a session Bean instance that a transaction is about to be committed.
 void ejbActivate()
          The activate method is called when the instance is activated from its "passive" state.
 void ejbCreate(java.lang.String name)
          Maps to EncStatefulHome.create
 void ejbPassivate()
          The passivate method is called before the instance enters the "passive" state.
 void ejbRemove()
          A container invokes this method before it ends the life of the session object.
 void lookupBooleanEntry()
           
 void lookupByteEntry()
           
 void lookupDoubleEntry()
           
 void lookupEntityBean()
           
 void lookupFloatEntry()
           
 void lookupIntegerEntry()
           
 void lookupLongEntry()
           
 void lookupResource()
           
 void lookupShortEntry()
           
 void lookupStatefulBean()
           
 void lookupStatelessBean()
           
 void lookupStringEntry()
           
 void setSessionContext(javax.ejb.SessionContext ctx)
          Set the associated session context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EncStatefulBean

public EncStatefulBean()
Method Detail

ejbCreate

public void ejbCreate(java.lang.String name)
               throws javax.ejb.CreateException
Maps to EncStatefulHome.create

Parameters:
name -
Throws:
javax.ejb.CreateException
See Also:
EncStatefulHome.create

lookupEntityBean

public void lookupEntityBean()
                      throws TestFailureException
Throws:
TestFailureException

lookupStatefulBean

public void lookupStatefulBean()
                        throws TestFailureException
Throws:
TestFailureException

lookupStatelessBean

public void lookupStatelessBean()
                         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

lookupResource

public void lookupResource()
                    throws TestFailureException
Throws:
TestFailureException

setSessionContext

public void setSessionContext(javax.ejb.SessionContext ctx)
                       throws javax.ejb.EJBException,
                              java.rmi.RemoteException
Set the associated session context. The container calls this method after the instance creation.

Specified by:
setSessionContext in interface javax.ejb.SessionBean
Throws:
javax.ejb.EJBException
java.rmi.RemoteException

ejbRemove

public void ejbRemove()
               throws javax.ejb.EJBException,
                      java.rmi.RemoteException
A container invokes this method before it ends the life of the session object. This happens as a result of a client's invoking a remove operation, or when a container decides to terminate the session object after a timeout.

Specified by:
ejbRemove in interface javax.ejb.SessionBean
Throws:
javax.ejb.EJBException
java.rmi.RemoteException

ejbActivate

public void ejbActivate()
                 throws javax.ejb.EJBException,
                        java.rmi.RemoteException
The activate method is called when the instance is activated from its "passive" state. The instance should acquire any resource that it has released earlier in the ejbPassivate() method.

Specified by:
ejbActivate in interface javax.ejb.SessionBean
Throws:
javax.ejb.EJBException
java.rmi.RemoteException

ejbPassivate

public void ejbPassivate()
                  throws javax.ejb.EJBException,
                         java.rmi.RemoteException
The passivate method is called before the instance enters the "passive" state. The instance should release any resources that it can re-acquire later in the ejbActivate() method.

Specified by:
ejbPassivate in interface javax.ejb.SessionBean
Throws:
javax.ejb.EJBException
java.rmi.RemoteException

afterBegin

public void afterBegin()
                throws javax.ejb.EJBException,
                       java.rmi.RemoteException
The afterBegin method notifies a session Bean instance that a new transaction has started, and that the subsequent business methods on the instance will be invoked in the context of the transaction.

Specified by:
afterBegin in interface javax.ejb.SessionSynchronization
Throws:
javax.ejb.EJBException
java.rmi.RemoteException

beforeCompletion

public void beforeCompletion()
                      throws javax.ejb.EJBException,
                             java.rmi.RemoteException
The beforeCompletion method notifies a session Bean instance that a transaction is about to be committed. The instance can use this method, for example, to write any cached data to a database.

Specified by:
beforeCompletion in interface javax.ejb.SessionSynchronization
Throws:
javax.ejb.EJBException
java.rmi.RemoteException

afterCompletion

public void afterCompletion(boolean committed)
                     throws javax.ejb.EJBException,
                            java.rmi.RemoteException
The afterCompletion method notifies a session Bean instance that a transaction commit protocol has completed, and tells the instance whether the transaction has been committed or rolled back.

Specified by:
afterCompletion in interface javax.ejb.SessionSynchronization
Throws:
javax.ejb.EJBException
java.rmi.RemoteException


Copyright © 1999-2011 OpenEJB. All Rights Reserved.