FileDocCategorySizeDatePackage
UserTransactionImpl.javaAPI DocJBoss 4.2.14024Fri Jul 13 20:53:50 BST 2007org.jboss.ejb3.embedded

UserTransactionImpl

public final class UserTransactionImpl extends Object implements UserTransaction, Externalizable
Comment
author
Bill Burke
version
$Revision: 60233 $

Fields Summary
protected static Logger
log
private TransactionManager
tm
Timeout value in seconds for new transactions started by this bean instance.
Constructors Summary
public UserTransactionImpl()


    
   
   
Methods Summary
public voidbegin()

      // Start the transaction
      tm.begin();

      Transaction tx = tm.getTransaction();
      if (log.isDebugEnabled())
         log.debug("UserTx begin: " + tx);

   
public voidcommit()

      Transaction tx = tm.getTransaction();
      if (log.isDebugEnabled())
         log.debug("UserTx commit: " + tx);

      tm.commit();
   
public intgetStatus()

      return tm.getStatus();
   
public voidreadExternal(java.io.ObjectInput in)

      this.tm = TxUtil.getTransactionManager();
   
public voidrollback()

      Transaction tx = tm.getTransaction();
      if (log.isDebugEnabled())
         log.debug("UserTx rollback: " + tx);
      tm.rollback();
   
public voidsetRollbackOnly()

      Transaction tx = tm.getTransaction();
      if (log.isDebugEnabled())
         log.debug("UserTx setRollbackOnly: " + tx);

      tm.setRollbackOnly();
   
public voidsetTransactionTimeout(int seconds)
Set the transaction timeout value for new transactions started by this instance.

      tm.setTransactionTimeout(seconds);
   
public voidstart()

      if (log.isDebugEnabled())
         log.debug("new UserTx: " + this);
      this.tm = TxUtil.getTransactionManager();
   
public voidstop()

      this.tm = null;
   
public voidwriteExternal(java.io.ObjectOutput out)

      //To change body of implemented methods use File | Settings | File Templates.