Class TransactionSynchronizationRegistryWrapper
java.lang.Object
io.quarkus.narayana.jta.runtime.internal.tsr.TransactionSynchronizationRegistryWrapper
- All Implemented Interfaces:
jakarta.transaction.TransactionSynchronizationRegistry
public class TransactionSynchronizationRegistryWrapper
extends Object
implements jakarta.transaction.TransactionSynchronizationRegistry
Agroal registers an interposed synchronization which validates that connections have been released.
Components such as hibernate release connections in an interposed synchronization.
Therefore, we must ensure that Agroal runs last.
This wrapper re-orders interposed synchronizations as follows: [other, hibernate-orm, agroal].
Synchronizations are placed into groups according to their package name and the groups are ordered which means that all hibernate synchronizations run before Agroal ones and all other synchs run before the hibernate ones.
See AgroalOrderedLastSynchronizationList for details of the re-ordering.
-
Constructor Summary
ConstructorsConstructorDescriptionTransactionSynchronizationRegistryWrapper(com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple transactionSynchronizationRegistryImple) -
Method Summary
Modifier and TypeMethodDescriptiongetResource(Object key) booleanintvoidputResource(Object key, Object value) voidregisterInterposedSynchronization(jakarta.transaction.Synchronization sync) void
-
Constructor Details
-
TransactionSynchronizationRegistryWrapper
public TransactionSynchronizationRegistryWrapper(com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple transactionSynchronizationRegistryImple)
-
-
Method Details
-
registerInterposedSynchronization
public void registerInterposedSynchronization(jakarta.transaction.Synchronization sync) - Specified by:
registerInterposedSynchronizationin interfacejakarta.transaction.TransactionSynchronizationRegistry
-
getTransactionKey
- Specified by:
getTransactionKeyin interfacejakarta.transaction.TransactionSynchronizationRegistry
-
getTransactionStatus
public int getTransactionStatus()- Specified by:
getTransactionStatusin interfacejakarta.transaction.TransactionSynchronizationRegistry
-
getRollbackOnly
public boolean getRollbackOnly()- Specified by:
getRollbackOnlyin interfacejakarta.transaction.TransactionSynchronizationRegistry
-
setRollbackOnly
public void setRollbackOnly()- Specified by:
setRollbackOnlyin interfacejakarta.transaction.TransactionSynchronizationRegistry
-
getResource
- Specified by:
getResourcein interfacejakarta.transaction.TransactionSynchronizationRegistry
-
putResource
- Specified by:
putResourcein interfacejakarta.transaction.TransactionSynchronizationRegistry
-