org.openejb.corba.services.transaction
Class UserTransaction
java.lang.Object
|
+--org.openejb.corba.services.transaction.UserTransaction
- All Implemented Interfaces:
- javax.transaction.UserTransaction
- public class UserTransaction
- extends java.lang.Object
- implements javax.transaction.UserTransaction
This class provides the UserTransaction interface implementation. It transmits all invocations to the
transaction manager.
- Author:
- Jerome Daniel ( jdaniel@intalio.com )
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 |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UserTransaction
public UserTransaction(javax.transaction.TransactionManager manager)
- Constructor
begin
public void begin()
throws javax.transaction.NotSupportedException,
javax.transaction.SystemException
- Create a new transaction
- Specified by:
begin
in interface javax.transaction.UserTransaction
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
- Specified by:
commit
in interface javax.transaction.UserTransaction
getStatus
public int getStatus()
throws javax.transaction.SystemException
- Return the transaction status.
- Specified by:
getStatus
in interface javax.transaction.UserTransaction
rollback
public void rollback()
throws java.lang.IllegalStateException,
java.lang.SecurityException,
javax.transaction.SystemException
- Rollback a transaction
- Specified by:
rollback
in interface javax.transaction.UserTransaction
setRollbackOnly
public void setRollbackOnly()
throws java.lang.IllegalStateException,
javax.transaction.SystemException
- Set the current transaction to be only rolledback
- Specified by:
setRollbackOnly
in interface javax.transaction.UserTransaction
setTransactionTimeout
public void setTransactionTimeout(int seconds)
throws javax.transaction.SystemException
- Set the transaction timeout.
- Specified by:
setTransactionTimeout
in interface javax.transaction.UserTransaction