org.jboss.test.txiiop.ejb
Class StatefulSessionBean

java.lang.Object
  extended byorg.jboss.test.util.ejb.EnterpriseSupport (src) 
      extended byorg.jboss.test.util.ejb.SessionSupport (src) 
          extended byorg.jboss.test.txiiop.ejb.StatefulSessionBean
All Implemented Interfaces:
EnterpriseBean (src) , java.io.Serializable, SessionBean (src) , SessionSynchronization (src)

public class StatefulSessionBean
extends SessionSupport (src)
implements SessionSynchronization (src)

The stateful session ejb implementation

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jboss.test.util.ejb.SessionSupport (src)
sessionCtx
 
Constructor Summary
StatefulSessionBean()
           
 
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 isCommited)
          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 decCounter()
           
 void ejbCreate(java.lang.String testName)
           
 int getCounter()
           
 void incCounter()
           
 void setCounter(int value)
           
 java.lang.String txMandatoryMethod(java.lang.String msg)
           
 
Methods inherited from class org.jboss.test.util.ejb.SessionSupport (src)
ejbActivate, ejbCreate, ejbPassivate, ejbRemove, setSessionContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatefulSessionBean

public StatefulSessionBean()
Method Detail

ejbCreate

public void ejbCreate(java.lang.String testName)

afterBegin

public void afterBegin()
Description copied from interface: SessionSynchronization (src)

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.

The instance can use this method, for example, to read data from a database and cache the data in the instance fields.

This method executes in the proper transaction context.

Specified by:
afterBegin in interface SessionSynchronization (src)

afterCompletion

public void afterCompletion(boolean isCommited)
Description copied from interface: SessionSynchronization (src)

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.

This method executes with no transaction context.

This method executes with no transaction context.

Specified by:
afterCompletion in interface SessionSynchronization (src)
Parameters:
isCommited - - True if the transaction has been committed, false if is has been rolled back.

beforeCompletion

public void beforeCompletion()
Description copied from interface: SessionSynchronization (src)

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.

This method executes in the proper transaction context.

Note: The instance may still cause the container to rollback the transaction by invoking the setRollbackOnly() method on the instance context, or by throwing an exception.

Specified by:
beforeCompletion in interface SessionSynchronization (src)

incCounter

public void incCounter()

decCounter

public void decCounter()

getCounter

public int getCounter()

setCounter

public void setCounter(int value)

txMandatoryMethod

public java.lang.String txMandatoryMethod(java.lang.String msg)