public class TransactionManagerImpl extends java.lang.Object implements TransactionManager, java.io.Serializable
| Constructor and Description |
|---|
TransactionManagerImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
begin()
Create a new transaction and associate it with the thread.
|
void |
commit()
Commit the transaction.
|
void |
destroy()
Handles the case where a class loader is dropped.
|
void |
flush()
Flushes the log stream (primarily for QA).
|
TransactionImpl |
getCurrent()
Returns the current TransactionImpl, creating if necessary.
|
static TransactionManagerImpl |
getInstance()
Returns the local transaction manager.
|
static TransactionManagerImpl |
getLocal()
Returns the local transaction manager.
|
int |
getStatus()
Returns the transaction's status
|
TransactionSynchronizationRegistry |
getSyncRegistry()
Returns the synchronization registry
|
long |
getTimeout()
Gets the timeout.
|
TransactionImpl |
getTransaction()
Returns the transaction for the current thread.
|
void |
recover(XAResource xaRes)
Returns the corresponding user transaction.
|
void |
resume(Transaction tobj)
Resume the transaction.
|
void |
rollback()
Rollback the transaction.
|
void |
setRollbackOnly()
Force any completion to be a rollback.
|
void |
setRollbackOnly(java.lang.Exception e)
Force any completion to be a rollback.
|
void |
setTimeout(Period timeout)
Sets the timeout.
|
void |
setTransactionTimeout(int seconds)
sets the timeout for the transaction
|
void |
setXALogManager(AbstractXALogManager xaLogManager)
Sets the XA log manager.
|
Transaction |
suspend()
Suspend the transaction.
|
void |
testClear()
Clearing for test purposes.
|
java.lang.String |
toString() |
public static TransactionManagerImpl getInstance()
public static TransactionManagerImpl getLocal()
public void setTimeout(Period timeout)
public long getTimeout()
public void setXALogManager(AbstractXALogManager xaLogManager)
public TransactionSynchronizationRegistry getSyncRegistry()
public void begin()
throws NotSupportedException,
SystemException
begin in interface TransactionManagerNotSupportedExceptionSystemExceptionpublic TransactionImpl getTransaction()
getTransaction in interface TransactionManagerpublic Transaction suspend() throws SystemException
suspend in interface TransactionManagerSystemExceptionpublic void resume(Transaction tobj) throws InvalidTransactionException, SystemException
resume in interface TransactionManagerInvalidTransactionExceptionSystemExceptionpublic void setRollbackOnly()
throws SystemException
setRollbackOnly in interface TransactionManagerSystemExceptionpublic void setRollbackOnly(java.lang.Exception e)
public int getStatus()
throws SystemException
getStatus in interface TransactionManagerSystemExceptionpublic void setTransactionTimeout(int seconds)
throws SystemException
setTransactionTimeout in interface TransactionManagerSystemExceptionpublic void commit()
throws RollbackException,
HeuristicMixedException,
HeuristicRollbackException,
SystemException
commit in interface TransactionManagerRollbackExceptionHeuristicMixedExceptionHeuristicRollbackExceptionSystemExceptionpublic void rollback()
rollback in interface TransactionManagerpublic TransactionImpl getCurrent()
public void recover(XAResource xaRes) throws XAException
XAExceptionpublic void flush()
public void destroy()
public void testClear()
public java.lang.String toString()
toString in class java.lang.Object