org.openejb.test.stateful
Class BeanTxStatefulBean

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

public class BeanTxStatefulBean
extends java.lang.Object
implements javax.ejb.SessionBean

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

Field Summary
 java.lang.String jndiDatabaseEntry
           
 
Constructor Summary
BeanTxStatefulBean()
           
 
Method Summary
 void ejbActivate()
          The activate method is called when the instance is activated from its "passive" state.
 void ejbCreate(java.lang.String name)
          Maps to BasicStatefulHome.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.
 Transaction getUserTransaction()
          Maps to BasicStatefulObject.businessMethod
 Transaction jndiUserTransaction()
           
 void openAccount(Account acct, java.lang.Boolean rollback)
           
 Account retreiveAccount(java.lang.String ssn)
           
 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
 

Field Detail

jndiDatabaseEntry

public final java.lang.String jndiDatabaseEntry
See Also:
Constant Field Values
Constructor Detail

BeanTxStatefulBean

public BeanTxStatefulBean()
Method Detail

ejbCreate

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

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

getUserTransaction

public Transaction getUserTransaction()
                               throws java.rmi.RemoteException
Maps to BasicStatefulObject.businessMethod

Returns:
Throws:
java.rmi.RemoteException
See Also:
BasicStatefulObject.businessMethod

jndiUserTransaction

public Transaction jndiUserTransaction()
                                throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

openAccount

public void openAccount(Account acct,
                        java.lang.Boolean rollback)
                 throws java.rmi.RemoteException,
                        javax.transaction.RollbackException
Throws:
java.rmi.RemoteException
javax.transaction.RollbackException

retreiveAccount

public Account retreiveAccount(java.lang.String ssn)
                        throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

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


Copyright © 1999-2011 OpenEJB. All Rights Reserved.