public class TuxTransactionManager
extends java.lang.Object
implements javax.transaction.TransactionManager, javax.transaction.UserTransaction, javax.naming.Referenceable
| Modifier and Type | Method and Description |
|---|---|
void |
begin()
Create a new transaction and associate it with the current thread.
|
void |
commit()
Complete the transaction associated with the current thread.
|
com.oracle.tuxedo.tjatmi.TuxTransaction |
getCurrentTransaction()
Get the transaction currently associated with the current thread context.
|
int |
getDefaultTransactionTimeout()
Get the default transaction timeout value asscociated with current
transaction manager.
|
javax.naming.Reference |
getReference()
Retrieves the Reference of this object.
|
int |
getStatus()
Obtain the status of the transaction associated with the current thread.
|
javax.transaction.Transaction |
getTransaction()
Get the transaction object that represents the transaction context of
the calling thread.
|
static javax.transaction.TransactionManager |
getTransactionManager() |
static javax.transaction.UserTransaction |
getUserTransaction() |
void |
resume(javax.transaction.Transaction tobj)
Resume the transaction context association of the calling thread with
the transaction represented by the supplied Transaction object.
|
void |
rollback()
Roll back the transaction associated with the current thread.
|
void |
setRollbackOnly()
Modify the transaction associated with the current thread such that the
only possible outcome of the transaction is to roll back the transaction.
|
void |
setTransactionTimeout(int seconds)
Modify the timeout value that is associated with transactions started by
subsequent invocations of the begin method.
|
javax.transaction.Transaction |
suspend()
Suspend the transaction currently associated with the calling thread and
return a Transaction object that represents the transaction context being
suspended.
|
java.lang.String |
toString() |
public void begin()
throws javax.transaction.NotSupportedException,
javax.transaction.SystemException
begin in interface javax.transaction.TransactionManagerbegin in interface javax.transaction.UserTransactionjavax.transaction.NotSupportedException - -
Thrown if the thread is already associated with a transaction
and the Transaction Manager implementation does not support
nested transactions.javax.transaction.SystemException - -
Thrown if the transaction manager encounters an unexpected
error condition.TransactionManager.begin()public void commit()
throws javax.transaction.RollbackException,
javax.transaction.HeuristicRollbackException,
javax.transaction.HeuristicMixedException,
java.lang.SecurityException,
java.lang.IllegalStateException,
javax.transaction.SystemException
commit in interface javax.transaction.TransactionManagercommit in interface javax.transaction.UserTransactionjavax.transaction.RollbackException - -
Thrown to indicate that the transaction has been rolled back
rather than committed.javax.transaction.HeuristicMixedException - -
Thrown to indicate that a heuristic decision was made and
that some relevant updates have been committed while others
have been rolled back.javax.transaction.HeuristicRollbackException - -
Thrown to indicate that a heuristic decision was made and
that all relevant updates have been rolled back.java.lang.SecurityException - -
Thrown to indicate that the thread is not allowed to commit
the transaction.java.lang.IllegalStateException - -
Thrown if the current thread is not associated with a
transaction.javax.transaction.SystemException - -
Thrown if the transaction manager encounters an unexpected
error condition.TransactionManager.commit()public void rollback()
throws java.lang.IllegalStateException,
java.lang.SecurityException,
javax.transaction.SystemException
rollback in interface javax.transaction.TransactionManagerrollback in interface javax.transaction.UserTransactionjava.lang.SecurityException - -
Thrown to indicate that the thread is not allowed to roll
back the transaction.java.lang.IllegalStateException - -
Thrown if the current thread is not associated with a
transaction.javax.transaction.SystemException - -
Thrown if the transaction manager encounters an unexpected
error condition.TransactionManager.rollback()public javax.transaction.Transaction suspend()
throws javax.transaction.SystemException
suspend in interface javax.transaction.TransactionManagerjavax.transaction.SystemException - -
Thrown if the transaction manager encounters an unexpected
error condition.TransactionManager.suspend()public void resume(javax.transaction.Transaction tobj)
throws javax.transaction.InvalidTransactionException,
java.lang.IllegalStateException,
javax.transaction.SystemException
resume in interface javax.transaction.TransactionManagertobj - The Transaction object that represents the transaction to
be resumed.javax.transaction.InvalidTransactionException - -
Thrown if the parameter transaction object contains an
invalid transaction.java.lang.IllegalStateException - -
Thrown if the thread is already associated with another
transaction.javax.transaction.SystemException - -
Thrown if the transaction manager encounters an unexpected
error condition.TransactionManager.resume(javax.transaction.Transaction)public void setRollbackOnly()
throws java.lang.IllegalStateException,
javax.transaction.SystemException
setRollbackOnly in interface javax.transaction.TransactionManagersetRollbackOnly in interface javax.transaction.UserTransactionjava.lang.IllegalStateException - -
Thrown if the current thread is not associated with a
transaction.javax.transaction.SystemException - -
Thrown if the transaction manager encounters an unexpected
error condition.TransactionManager.setRollbackOnly()public void setTransactionTimeout(int seconds)
throws javax.transaction.SystemException
setTransactionTimeout in interface javax.transaction.TransactionManagersetTransactionTimeout in interface javax.transaction.UserTransactionseconds - -
The value of the timeout in seconds. If the value is zero, the
transaction service restores the default value. If the value
is negative a SystemException is thrown.javax.transaction.SystemException - -
Thrown if the transaction manager encounters an unexpected
error condition.TransactionManager.setTransactionTimeout(int)public int getStatus()
throws javax.transaction.SystemException
getStatus in interface javax.transaction.TransactionManagergetStatus in interface javax.transaction.UserTransactionjavax.transaction.SystemException - -
Thrown if the transaction manager encounters an unexpected
error condition.TransactionManager.getStatus()public javax.transaction.Transaction getTransaction()
throws javax.transaction.SystemException
getTransaction in interface javax.transaction.TransactionManagerjavax.transaction.SystemException - -
Thrown if the transaction manager encounters an unexpected
error condition.TransactionManager.getTransaction()public static javax.transaction.TransactionManager getTransactionManager()
public static javax.transaction.UserTransaction getUserTransaction()
public com.oracle.tuxedo.tjatmi.TuxTransaction getCurrentTransaction()
public int getDefaultTransactionTimeout()
public java.lang.String toString()
toString in class java.lang.Objectpublic javax.naming.Reference getReference()
throws javax.naming.NamingException
getReference in interface javax.naming.Referenceablejavax.naming.NamingException - If a naming exception was encountered
while retrieving the reference.Copyright © 1996, 2024, Oracle and/or its affiliates.