Package org.frankframework.jta
Class TransactionConnectorCoordinator<T,R>
java.lang.Object
org.frankframework.jta.TransactionConnectorCoordinator<T,R>
- All Implemented Interfaces:
AutoCloseable
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
static <T,
R, E extends Exception>
TdoInUnsuspendedTransationContext
(ThrowingSupplier<T, E> action) Execute an action with the thread prepared for enlisting transactional resources.static <T,
R> TransactionConnectorCoordinator<T, R> getInstance
(IThreadConnectableTransactionManager<T, R> txManager) static <T,
R, E extends Exception>
booleanonEndChildThread
(ThrowingRunnable<E> action) Execute an action when the thread ends, if it is guarded by a TransactionConnectorvoid
registerConnector
(TransactionConnector connector) void
void
resumeTransactionInChildThread
(TransactionConnector<T, R> requester) void
-
Field Details
-
log
protected static org.apache.logging.log4j.Logger log
-
-
Method Details
-
getInstance
public static <T,R> TransactionConnectorCoordinator<T,R> getInstance(IThreadConnectableTransactionManager<T, R> txManager) -
registerConnector
-
doInUnsuspendedTransationContext
public static <T,R, T doInUnsuspendedTransationContextE extends Exception> (ThrowingSupplier<T, E> action) throws EExecute an action with the thread prepared for enlisting transactional resources. To be called for obtaining transactional resources (like JDBC connections) if a TransactionConnector might already have been created on the thread.- Throws:
E extends Exception
- See Also:
-
FixedQuerySender#provideOutputStream
-
onEndChildThread
Execute an action when the thread ends, if it is guarded by a TransactionConnector- See Also:
-
FixedQuerySender#provideOutputStream
-
resumeTransactionInChildThread
-
suspendTransaction
public void suspendTransaction() -
resumeTransaction
public void resumeTransaction() -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-