Package org.jboss.narayana.jta.jms
Class TransactionHelperImpl
- java.lang.Object
-
- org.jboss.narayana.jta.jms.TransactionHelperImpl
-
- All Implemented Interfaces:
TransactionHelper
public class TransactionHelperImpl extends Object implements TransactionHelper
- Author:
- Gytis Trikleris
-
-
Constructor Summary
Constructors Constructor Description TransactionHelperImpl(jakarta.transaction.TransactionManager transactionManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidderegisterXAResource(XAResource xaResource)Delist XA resource from a current transaction.booleanisTransactionAvailable()Check if transaction is active.voidregisterSynchronization(jakarta.transaction.Synchronization synchronization)Register synchronization with a current transaction.voidregisterXAResource(XAResource xaResource)Enlist XA resource to a current transaction.
-
-
-
Method Detail
-
isTransactionAvailable
public boolean isTransactionAvailable() throws jakarta.jms.JMSExceptionDescription copied from interface:TransactionHelperCheck if transaction is active. If error occurs wrap an original exception withJMSException.- Specified by:
isTransactionAvailablein interfaceTransactionHelper- Returns:
- whether transaction is active or not.
- Throws:
jakarta.jms.JMSException- if transaction service has failed in unexpected way to obtain transaction status
-
registerSynchronization
public void registerSynchronization(jakarta.transaction.Synchronization synchronization) throws jakarta.jms.JMSExceptionDescription copied from interface:TransactionHelperRegister synchronization with a current transaction. If error occurs wrap an original exception withJMSException.- Specified by:
registerSynchronizationin interfaceTransactionHelper- Parameters:
synchronization- synchronization to be registered.- Throws:
jakarta.jms.JMSException- if error occurred registering synchronization that occurs when transaction service fails in an unexpected way or when the transaction is marked for rollback only or when transaction is in a state whereSynchronizationcallbacks cannot be registered
-
registerXAResource
public void registerXAResource(XAResource xaResource) throws jakarta.jms.JMSException
Description copied from interface:TransactionHelperEnlist XA resource to a current transaction. If error occurs wrap an original exception withJMSException.- Specified by:
registerXAResourcein interfaceTransactionHelper- Parameters:
xaResource- resource to be enlisted.- Throws:
jakarta.jms.JMSException- if error occurred enlisting resource that occurs when transaction service fails in an unexpected way or when the transaction is marked for rollback only or when transaction is in a state where resources cannot be enlisted.
-
deregisterXAResource
public void deregisterXAResource(XAResource xaResource) throws jakarta.jms.JMSException
Description copied from interface:TransactionHelperDelist XA resource from a current transaction. If error occurs wrap an original exception withJMSException.- Specified by:
deregisterXAResourcein interfaceTransactionHelper- Parameters:
xaResource- resource to be delisted.- Throws:
jakarta.jms.JMSException- if error occurred delisting resource. that occurs when transaction service fails in an unexpected way or when transaction is in a state where resources cannot be delisted.
-
-