Package com.arjuna.ats.jbossatx
Class BaseTransactionManagerDelegate
java.lang.Object
com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate
- All Implemented Interfaces:
jakarta.transaction.TransactionManager
,org.jboss.tm.listener.TransactionListenerRegistry
,org.jboss.tm.TransactionLocalDelegate
,org.jboss.tm.TransactionTimeoutConfiguration
- Direct Known Subclasses:
TransactionManagerDelegate
,TransactionManagerDelegate
@Deprecated
public abstract class BaseTransactionManagerDelegate
extends Object
implements jakarta.transaction.TransactionManager, org.jboss.tm.TransactionLocalDelegate, org.jboss.tm.TransactionTimeoutConfiguration, org.jboss.tm.listener.TransactionListenerRegistry
Deprecated.
Delegate for JBoss TransactionManager/TransactionLocalDelegate.
- Author:
- kevin
-
Constructor Summary
ModifierConstructorDescriptionprotected
BaseTransactionManagerDelegate
(jakarta.transaction.TransactionManager transactionManager) Deprecated.Construct the delegate using the specified transaction manager. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(jakarta.transaction.Transaction transaction, org.jboss.tm.listener.TransactionListener listener, EnumSet<org.jboss.tm.listener.EventType> types) Deprecated.register a listener for transaction related events that effect the current threadvoid
begin()
Deprecated.Begin a transaction and associate it with the current thread.void
commit()
Deprecated.Commit the current transaction and disassociate from the thread.boolean
containsValue
(org.jboss.tm.TransactionLocal transactionLocal, jakarta.transaction.Transaction transaction) Deprecated.Does the specified transaction contain a value for the transaction local.int
Deprecated.Get the transaction status.jakarta.transaction.Transaction
Deprecated.Get the transaction associated with the thread.getValue
(org.jboss.tm.TransactionLocal transactionLocal, jakarta.transaction.Transaction transaction) Deprecated.Get value of the transaction local in the specified transaction.void
lock
(org.jboss.tm.TransactionLocal local, jakarta.transaction.Transaction transaction) Deprecated.Lock the transaction local in the context of this transaction.void
resume
(jakarta.transaction.Transaction transaction) Deprecated.Resume the specified transaction.void
rollback()
Deprecated.Rollback the current transaction and disassociate from the thread.void
Deprecated.Set rollback only on the current transaction.void
setTransactionTimeout
(int timeout) Deprecated.Set the transaction timeout on the current thread.void
storeValue
(org.jboss.tm.TransactionLocal transactionLocal, jakarta.transaction.Transaction transaction, Object value) Deprecated.Store the value of the transaction local in the specified transaction.jakarta.transaction.Transaction
suspend()
Deprecated.Suspend the current transaction.void
unlock
(org.jboss.tm.TransactionLocal local, jakarta.transaction.Transaction transaction) Deprecated.Unlock the transaction local in the context of this transactionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jboss.tm.TransactionTimeoutConfiguration
getTimeLeftBeforeTransactionTimeout, getTransactionTimeout
-
Constructor Details
-
BaseTransactionManagerDelegate
protected BaseTransactionManagerDelegate(jakarta.transaction.TransactionManager transactionManager) Deprecated.Construct the delegate using the specified transaction manager.- Parameters:
transactionManager
- The delegate transaction manager.
-
-
Method Details
-
begin
public void begin() throws jakarta.transaction.NotSupportedException, jakarta.transaction.SystemExceptionDeprecated.Begin a transaction and associate it with the current thread.- Specified by:
begin
in interfacejakarta.transaction.TransactionManager
- Throws:
jakarta.transaction.NotSupportedException
jakarta.transaction.SystemException
-
commit
public void commit() throws jakarta.transaction.RollbackException, jakarta.transaction.HeuristicMixedException, jakarta.transaction.HeuristicRollbackException, SecurityException, IllegalStateException, jakarta.transaction.SystemExceptionDeprecated.Commit the current transaction and disassociate from the thread.- Specified by:
commit
in interfacejakarta.transaction.TransactionManager
- Throws:
jakarta.transaction.RollbackException
jakarta.transaction.HeuristicMixedException
jakarta.transaction.HeuristicRollbackException
SecurityException
IllegalStateException
jakarta.transaction.SystemException
-
getStatus
public int getStatus() throws jakarta.transaction.SystemExceptionDeprecated.Get the transaction status.- Specified by:
getStatus
in interfacejakarta.transaction.TransactionManager
- Returns:
- the transaction status.
- Throws:
jakarta.transaction.SystemException
-
getTransaction
public jakarta.transaction.Transaction getTransaction() throws jakarta.transaction.SystemExceptionDeprecated.Get the transaction associated with the thread.- Specified by:
getTransaction
in interfacejakarta.transaction.TransactionManager
- Returns:
- the transaction or null if none associated.
- Throws:
jakarta.transaction.SystemException
-
resume
public void resume(jakarta.transaction.Transaction transaction) throws jakarta.transaction.InvalidTransactionException, IllegalStateException, jakarta.transaction.SystemException Deprecated.Resume the specified transaction.- Specified by:
resume
in interfacejakarta.transaction.TransactionManager
- Parameters:
transaction
- The transaction to resume.- Throws:
jakarta.transaction.InvalidTransactionException
IllegalStateException
jakarta.transaction.SystemException
-
rollback
public void rollback() throws IllegalStateException, SecurityException, jakarta.transaction.SystemExceptionDeprecated.Rollback the current transaction and disassociate from the thread.- Specified by:
rollback
in interfacejakarta.transaction.TransactionManager
- Throws:
IllegalStateException
SecurityException
jakarta.transaction.SystemException
-
setRollbackOnly
Deprecated.Set rollback only on the current transaction.- Specified by:
setRollbackOnly
in interfacejakarta.transaction.TransactionManager
- Throws:
IllegalStateException
jakarta.transaction.SystemException
-
setTransactionTimeout
public void setTransactionTimeout(int timeout) throws jakarta.transaction.SystemException Deprecated.Set the transaction timeout on the current thread.- Specified by:
setTransactionTimeout
in interfacejakarta.transaction.TransactionManager
- Parameters:
timeout
- The transaction timeout.- Throws:
jakarta.transaction.SystemException
-
addListener
public void addListener(jakarta.transaction.Transaction transaction, org.jboss.tm.listener.TransactionListener listener, EnumSet<org.jboss.tm.listener.EventType> types) throws org.jboss.tm.listener.TransactionTypeNotSupported Deprecated.register a listener for transaction related events that effect the current thread- Specified by:
addListener
in interfaceorg.jboss.tm.listener.TransactionListenerRegistry
- Parameters:
transaction
- the transaction that the caller is interested in receiving events for (must not be null)listener
- the callback for event notificationstypes
- a collection of events that the listener is interested in- Throws:
org.jboss.tm.listener.TransactionTypeNotSupported
- if the passed in transaction type does not support the listeners feature
-
suspend
public jakarta.transaction.Transaction suspend() throws jakarta.transaction.SystemExceptionDeprecated.Suspend the current transaction.- Specified by:
suspend
in interfacejakarta.transaction.TransactionManager
- Returns:
- The suspended transaction.
- Throws:
jakarta.transaction.SystemException
-
containsValue
public boolean containsValue(org.jboss.tm.TransactionLocal transactionLocal, jakarta.transaction.Transaction transaction) Deprecated.Does the specified transaction contain a value for the transaction local.- Specified by:
containsValue
in interfaceorg.jboss.tm.TransactionLocalDelegate
- Parameters:
transactionLocal
- The associated transaction local.transaction
- The associated transaction.- Returns:
- true if a value exists within the specified transaction, false otherwise.
-
getValue
public Object getValue(org.jboss.tm.TransactionLocal transactionLocal, jakarta.transaction.Transaction transaction) Deprecated.Get value of the transaction local in the specified transaction.- Specified by:
getValue
in interfaceorg.jboss.tm.TransactionLocalDelegate
- Parameters:
transactionLocal
- The associated transaction local.transaction
- The associated transaction.- Returns:
- The value of the transaction local.
-
storeValue
public void storeValue(org.jboss.tm.TransactionLocal transactionLocal, jakarta.transaction.Transaction transaction, Object value) Deprecated.Store the value of the transaction local in the specified transaction.- Specified by:
storeValue
in interfaceorg.jboss.tm.TransactionLocalDelegate
- Parameters:
transactionLocal
- The associated transaction local.transaction
- The associated transaction.value
- The value of the transaction local.
-
lock
public void lock(org.jboss.tm.TransactionLocal local, jakarta.transaction.Transaction transaction) throws InterruptedException Deprecated.Lock the transaction local in the context of this transaction.- Specified by:
lock
in interfaceorg.jboss.tm.TransactionLocalDelegate
- Parameters:
local
- the transaction localtransaction
- the transcation- Throws:
IllegalStateException
- if the transaction is not activeInterruptedException
- if the thread is interrupted
-
unlock
public void unlock(org.jboss.tm.TransactionLocal local, jakarta.transaction.Transaction transaction) Deprecated.Unlock the transaction local in the context of this transaction- Specified by:
unlock
in interfaceorg.jboss.tm.TransactionLocalDelegate
- Parameters:
local
- the transaction localtransaction
- the transcation
-