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 TransactionManager
NotSupportedException
SystemException
public TransactionImpl getTransaction()
getTransaction
in interface TransactionManager
public Transaction suspend() throws SystemException
suspend
in interface TransactionManager
SystemException
public void resume(Transaction tobj) throws InvalidTransactionException, SystemException
resume
in interface TransactionManager
InvalidTransactionException
SystemException
public void setRollbackOnly() throws SystemException
setRollbackOnly
in interface TransactionManager
SystemException
public void setRollbackOnly(java.lang.Exception e)
public int getStatus() throws SystemException
getStatus
in interface TransactionManager
SystemException
public void setTransactionTimeout(int seconds) throws SystemException
setTransactionTimeout
in interface TransactionManager
SystemException
public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SystemException
commit
in interface TransactionManager
RollbackException
HeuristicMixedException
HeuristicRollbackException
SystemException
public void rollback()
rollback
in interface TransactionManager
public TransactionImpl getCurrent()
public void recover(XAResource xaRes) throws XAException
XAException
public void flush()
public void destroy()
public void testClear()
public java.lang.String toString()
toString
in class java.lang.Object