org.openorb.ots.jta
Class UserTransaction

java.lang.Object
  extended byorg.openorb.ots.jta.UserTransaction

public class UserTransaction
extends java.lang.Object

This class provides the UserTransaction interface implementation. It transmits all invocations to the transaction manager.

Author:
Jerome Daniel

Constructor Summary
UserTransaction(javax.transaction.TransactionManager manager)
          Constructor
 
Method Summary
 void begin()
          Create a new transaction
 void commit()
          Commit the current transaction
 int getStatus()
          Return the transaction status.
 void rollback()
          Rollback a transaction
 void setRollbackOnly()
          Set the current transaction to be only rolledback
 void setTransactionTimeout(int seconds)
          Set the transaction timeout.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserTransaction

public UserTransaction(javax.transaction.TransactionManager manager)
Constructor

Method Detail

begin

public void begin()
           throws javax.transaction.NotSupportedException,
                  javax.transaction.SystemException
Create a new transaction

Throws:
javax.transaction.NotSupportedException
javax.transaction.SystemException

commit

public void commit()
            throws javax.transaction.RollbackException,
                   javax.transaction.HeuristicMixedException,
                   javax.transaction.HeuristicRollbackException,
                   java.lang.SecurityException,
                   java.lang.IllegalStateException,
                   javax.transaction.SystemException
Commit the current transaction

Throws:
javax.transaction.RollbackException
javax.transaction.HeuristicMixedException
javax.transaction.HeuristicRollbackException
java.lang.SecurityException
java.lang.IllegalStateException
javax.transaction.SystemException

getStatus

public int getStatus()
              throws javax.transaction.SystemException
Return the transaction status.

Throws:
javax.transaction.SystemException

rollback

public void rollback()
              throws java.lang.IllegalStateException,
                     java.lang.SecurityException,
                     javax.transaction.SystemException
Rollback a transaction

Throws:
java.lang.IllegalStateException
java.lang.SecurityException
javax.transaction.SystemException

setRollbackOnly

public void setRollbackOnly()
                     throws java.lang.IllegalStateException,
                            javax.transaction.SystemException
Set the current transaction to be only rolledback

Throws:
java.lang.IllegalStateException
javax.transaction.SystemException

setTransactionTimeout

public void setTransactionTimeout(int seconds)
                           throws javax.transaction.SystemException
Set the transaction timeout.

Throws:
javax.transaction.SystemException