public abstract class BaseTransactionManagerDelegate extends Object implements TransactionManager, org.jboss.tm.TransactionLocalDelegate, org.jboss.tm.TransactionTimeoutConfiguration, org.jboss.tm.listener.TransactionListenerRegistry
| Modifier | Constructor and Description |
|---|---|
protected |
BaseTransactionManagerDelegate(TransactionManager transactionManager)
Construct the delegate using the specified transaction manager.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(Transaction transaction,
org.jboss.tm.listener.TransactionListener listener,
EnumSet<org.jboss.tm.listener.EventType> types)
register a listener for transaction related events that effect the current thread
|
void |
begin()
Begin a transaction and associate it with the current thread.
|
void |
commit()
Commit the current transaction and disassociate from the thread.
|
boolean |
containsValue(org.jboss.tm.TransactionLocal transactionLocal,
Transaction transaction)
Does the specified transaction contain a value for the transaction local.
|
int |
getStatus()
Get the transaction status.
|
Transaction |
getTransaction()
Get the transaction associated with the thread.
|
Object |
getValue(org.jboss.tm.TransactionLocal transactionLocal,
Transaction transaction)
Get value of the transaction local in the specified transaction.
|
void |
lock(org.jboss.tm.TransactionLocal local,
Transaction transaction)
Lock the transaction local in the context of this transaction.
|
void |
resume(Transaction transaction)
Resume the specified transaction.
|
void |
rollback()
Rollback the current transaction and disassociate from the thread.
|
void |
setRollbackOnly()
Set rollback only on the current transaction.
|
void |
setTransactionTimeout(int timeout)
Set the transaction timeout on the current thread.
|
void |
storeValue(org.jboss.tm.TransactionLocal transactionLocal,
Transaction transaction,
Object value)
Store the value of the transaction local in the specified transaction.
|
Transaction |
suspend()
Suspend the current transaction.
|
void |
unlock(org.jboss.tm.TransactionLocal local,
Transaction transaction)
Unlock the transaction local in the context of this transaction
|
protected BaseTransactionManagerDelegate(TransactionManager transactionManager)
transactionManager - The delegate transaction manager.public void begin()
throws NotSupportedException,
SystemException
begin in interface TransactionManagerNotSupportedExceptionSystemExceptionpublic void commit()
throws RollbackException,
HeuristicMixedException,
HeuristicRollbackException,
SecurityException,
IllegalStateException,
SystemException
commit in interface TransactionManagerRollbackExceptionHeuristicMixedExceptionHeuristicRollbackExceptionSecurityExceptionIllegalStateExceptionSystemExceptionpublic int getStatus()
throws SystemException
getStatus in interface TransactionManagerSystemExceptionpublic Transaction getTransaction() throws SystemException
getTransaction in interface TransactionManagerSystemExceptionpublic void resume(Transaction transaction) throws InvalidTransactionException, IllegalStateException, SystemException
resume in interface TransactionManagertransaction - The transaction to resume.InvalidTransactionExceptionIllegalStateExceptionSystemExceptionpublic void rollback()
throws IllegalStateException,
SecurityException,
SystemException
rollback in interface TransactionManagerIllegalStateExceptionSecurityExceptionSystemExceptionpublic void setRollbackOnly()
throws IllegalStateException,
SystemException
setRollbackOnly in interface TransactionManagerIllegalStateExceptionSystemExceptionpublic void setTransactionTimeout(int timeout)
throws SystemException
setTransactionTimeout in interface TransactionManagertimeout - The transaction timeout.SystemExceptionpublic void addListener(Transaction transaction, org.jboss.tm.listener.TransactionListener listener, EnumSet<org.jboss.tm.listener.EventType> types) throws org.jboss.tm.listener.TransactionTypeNotSupported
addListener in interface org.jboss.tm.listener.TransactionListenerRegistrylistener - the callback for event notificationsorg.jboss.tm.listener.TransactionTypeNotSupportedpublic Transaction suspend() throws SystemException
suspend in interface TransactionManagerSystemExceptionpublic boolean containsValue(org.jboss.tm.TransactionLocal transactionLocal,
Transaction transaction)
containsValue in interface org.jboss.tm.TransactionLocalDelegatetransactionLocal - The associated transaction local.transaction - The associated transaction.public Object getValue(org.jboss.tm.TransactionLocal transactionLocal, Transaction transaction)
getValue in interface org.jboss.tm.TransactionLocalDelegatetransactionLocal - The associated transaction local.transaction - The associated transaction.public void storeValue(org.jboss.tm.TransactionLocal transactionLocal,
Transaction transaction,
Object value)
storeValue in interface org.jboss.tm.TransactionLocalDelegatetransactionLocal - The associated transaction local.transaction - The associated transaction.value - The value of the transaction local.public void lock(org.jboss.tm.TransactionLocal local,
Transaction transaction)
throws InterruptedException
lock in interface org.jboss.tm.TransactionLocalDelegateIllegalStateException - if the transaction is not activeInterruptedException - if the thread is interruptedpublic void unlock(org.jboss.tm.TransactionLocal local,
Transaction transaction)
unlock in interface org.jboss.tm.TransactionLocalDelegateCopyright © 2022 JBoss by Red Hat. All rights reserved.