Interface TransactionBatch

All Superinterfaces:
AutoCloseable, Batch, SuspendedBatch
All Known Implementing Classes:
ThreadLocalTransactionBatch

public interface TransactionBatch extends Batch, SuspendedBatch
TransactionBatch that associates and exposes the underlying transaction.
Author:
Paul Ferraro
  • Method Details

    • getTransaction

      jakarta.transaction.Transaction getTransaction()
      Returns the transaction associated with this batch
      Returns:
      a transaction
    • interpose

      TransactionBatch interpose()
      Returns an interposed batch.
      Returns:
      an interposed batch.
    • factory

      static <E extends RuntimeException> TransactionBatch.Factory factory(String name, jakarta.transaction.TransactionManager tm, Function<Throwable,E> exceptionTransformer)
      Returns a transaction-based Batch factory.
      Type Parameters:
      E - the target exception type
      Parameters:
      name - a logical name of this batcher
      tm - a transaction manager
      exceptionTransformer - an exception wrapper
      Returns:
      a new transaction batcher