public class UserTransactionProxy extends java.lang.Object implements UserTransaction, TransactionManager, java.io.Serializable
| Modifier and Type | Method and Description |
|---|---|
void |
abortTransaction()
Finish any transaction.
|
void |
begin()
Start the transaction.
|
void |
commit()
Commits the transaction
|
static UserTransactionProxy |
getCurrent()
Returns the local UT proxy.
|
UserTransactionImpl |
getCurrentUserTransactionImpl()
Gets the current thread transaction.
|
static UserTransactionProxy |
getInstance()
Returns the local UT proxy.
|
int |
getStatus()
Gets the transaction's status
|
Transaction |
getTransaction()
Returns the current transaction.
|
UserTransactionImpl |
getUserTransaction()
Gets the thread transaction.
|
void |
recover(XAResource xaRes)
Recovers an XAResource
|
void |
resume(Transaction transaction)
Resume a transaction.
|
void |
rollback()
Rolls the transaction back
|
void |
setRollbackOnly()
Marks the transaction as rollback only.
|
void |
setRollbackOnly(java.lang.Exception e)
Marks the transaction as rollback only.
|
void |
setTransactionTimeout(int seconds)
Sets the transaction's timeout.
|
Transaction |
suspend()
Suspends the transaction.
|
java.lang.String |
toString() |
public static UserTransactionProxy getInstance()
public static UserTransactionProxy getCurrent()
public UserTransactionImpl getUserTransaction()
public UserTransactionImpl getCurrentUserTransactionImpl()
public void setTransactionTimeout(int seconds)
throws SystemException
setTransactionTimeout in interface TransactionManagersetTransactionTimeout in interface UserTransactionSystemExceptionpublic int getStatus()
throws SystemException
getStatus in interface TransactionManagergetStatus in interface UserTransactionSystemExceptionpublic void begin()
throws NotSupportedException,
SystemException
begin in interface TransactionManagerbegin in interface UserTransactionNotSupportedExceptionSystemExceptionpublic void setRollbackOnly()
throws java.lang.IllegalStateException,
SystemException
setRollbackOnly in interface TransactionManagersetRollbackOnly in interface UserTransactionjava.lang.IllegalStateExceptionSystemExceptionpublic void setRollbackOnly(java.lang.Exception e)
throws java.lang.IllegalStateException
java.lang.IllegalStateExceptionpublic void commit()
throws java.lang.IllegalStateException,
RollbackException,
HeuristicMixedException,
HeuristicRollbackException,
java.lang.SecurityException,
SystemException
commit in interface TransactionManagercommit in interface UserTransactionjava.lang.IllegalStateExceptionRollbackExceptionHeuristicMixedExceptionHeuristicRollbackExceptionjava.lang.SecurityExceptionSystemExceptionpublic void rollback()
throws java.lang.IllegalStateException,
java.lang.SecurityException,
SystemException
rollback in interface TransactionManagerrollback in interface UserTransactionjava.lang.IllegalStateExceptionjava.lang.SecurityExceptionSystemExceptionpublic void abortTransaction()
throws java.lang.IllegalStateException
java.lang.IllegalStateExceptionpublic void recover(XAResource xaRes) throws XAException
XAExceptionpublic Transaction getTransaction() throws SystemException
getTransaction in interface TransactionManagerSystemExceptionpublic Transaction suspend() throws SystemException
suspend in interface TransactionManagerSystemExceptionpublic void resume(Transaction transaction) throws java.lang.IllegalStateException, InvalidTransactionException, SystemException
resume in interface TransactionManagerjava.lang.IllegalStateExceptionInvalidTransactionExceptionSystemExceptionpublic java.lang.String toString()
toString in class java.lang.Object