org.jboss.seam.transaction
Class CMTTransaction

java.lang.Object
  extended by org.jboss.seam.transaction.AbstractUserTransaction
      extended by org.jboss.seam.transaction.CMTTransaction
All Implemented Interfaces:
UserTransaction

public class CMTTransaction
extends AbstractUserTransaction

Wraps EJBContext transaction management in a UserTransaction interface. Note that container managed transactions cannot be controlled by the application, so begin(), commit() and rollback() are disallowed in a CMT.

Author:
Mike Youngstrom, Gavin King

Constructor Summary
CMTTransaction(javax.ejb.EJBContext ejbContext)
           
 
Method Summary
 void begin()
           
 void commit()
           
 int getStatus()
           
 void registerSynchronization(Synchronization sync)
           
 void rollback()
           
 void setRollbackOnly()
           
 void setTransactionTimeout(int timeout)
           
 
Methods inherited from class org.jboss.seam.transaction.AbstractUserTransaction
enlist, getSynchronizations, isActive, isActiveOrMarkedRollback, isCommitted, isConversationContextRequired, isMarkedRollback, isNoTransaction, isRolledBack, isRolledBackOrMarkedRollback
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CMTTransaction

public CMTTransaction(javax.ejb.EJBContext ejbContext)
Method Detail

begin

public void begin()
           throws NotSupportedException,
                  SystemException
Throws:
NotSupportedException
SystemException

commit

public void commit()
            throws RollbackException,
                   HeuristicMixedException,
                   HeuristicRollbackException,
                   SecurityException,
                   IllegalStateException,
                   SystemException
Throws:
RollbackException
HeuristicMixedException
HeuristicRollbackException
SecurityException
IllegalStateException
SystemException

rollback

public void rollback()
              throws IllegalStateException,
                     SecurityException,
                     SystemException
Throws:
IllegalStateException
SecurityException
SystemException

getStatus

public int getStatus()
              throws SystemException
Throws:
SystemException

setRollbackOnly

public void setRollbackOnly()
                     throws IllegalStateException,
                            SystemException
Throws:
IllegalStateException
SystemException

setTransactionTimeout

public void setTransactionTimeout(int timeout)
                           throws SystemException
Throws:
SystemException

registerSynchronization

public void registerSynchronization(Synchronization sync)
Specified by:
registerSynchronization in class AbstractUserTransaction