FileDocCategorySizeDatePackage
UserTransactionImpl.javaAPI DocJBoss 4.2.13967Fri Jul 13 20:53:54 BST 2007org.jboss.ejb3.tx

UserTransactionImpl

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

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


    
   
      if (log.isDebugEnabled())
         log.debug("new UserTx: " + this);
      this.tm = TxUtil.getTransactionManager();
   
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 voidwriteExternal(java.io.ObjectOutput out)

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