Class TransactionConnectorCoordinator<T,R>

java.lang.Object
org.frankframework.jta.TransactionConnectorCoordinator<T,R>
All Implemented Interfaces:
AutoCloseable

public class TransactionConnectorCoordinator<T,R> extends Object implements AutoCloseable
  • 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

      public void registerConnector(TransactionConnector connector)
    • doInUnsuspendedTransationContext

      public static <T, R, E extends Exception> T doInUnsuspendedTransationContext(ThrowingSupplier<T,E> action) throws E
      Execute 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

      public static <T, R, E extends Exception> boolean onEndChildThread(ThrowingRunnable<E> action)
      Execute an action when the thread ends, if it is guarded by a TransactionConnector
      See Also:
      • FixedQuerySender#provideOutputStream
    • resumeTransactionInChildThread

      public void resumeTransactionInChildThread(TransactionConnector<T,R> requester)
    • suspendTransaction

      public void suspendTransaction()
    • resumeTransaction

      public void resumeTransaction()
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable