Package org.jboss.narayana.jta.jms
Interface TransactionHelper
-
- All Known Implementing Classes:
TransactionHelperImpl
public interface TransactionHelperUtility class to make transaction status checking and resources registration easier.- Author:
- Gytis Trikleris
-
-
Method Summary
All Methods Instance Methods Abstract 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
boolean isTransactionAvailable() throws jakarta.jms.JMSExceptionCheck if transaction is active. If error occurs wrap an original exception withJMSException.- Returns:
- whether transaction is active or not.
- Throws:
jakarta.jms.JMSException- if transaction service has failed in unexpected way to obtain transaction status
-
registerSynchronization
void registerSynchronization(jakarta.transaction.Synchronization synchronization) throws jakarta.jms.JMSExceptionRegister synchronization with a current transaction. If error occurs wrap an original exception withJMSException.- 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
void registerXAResource(XAResource xaResource) throws jakarta.jms.JMSException
Enlist XA resource to a current transaction. If error occurs wrap an original exception withJMSException.- 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
void deregisterXAResource(XAResource xaResource) throws jakarta.jms.JMSException
Delist XA resource from a current transaction. If error occurs wrap an original exception withJMSException.- 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.
-
-