org.openejb.test.stateless
Class BeanTxStatelessBean

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

public class BeanTxStatelessBean
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
BeanTxStatelessBean()
           
 
Method Summary
 void ejbActivate()
          The activate method is called when the instance is activated from its "passive" state.
 void ejbCreate()
           
 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()
           
 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

BeanTxStatelessBean

public BeanTxStatelessBean()
Method Detail

getUserTransaction

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

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

ejbCreate

public void ejbCreate()
               throws javax.ejb.CreateException
Parameters:
name -
Throws:
javax.ejb.CreateException

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.