TransactionProvider
SPI can be used to implement custom transaction
behaviour that is applied when calling {@link DSLContext#transactionResult(TransactionalCallable)} or{@link DSLContext#transaction(TransactionalRunnable)}. A new {@link Configuration} copy is created from the calling{@link DSLContext} for the scope of a single transactions. Implementors mayfreely add custom data to {@link Configuration#data()}, in order to share information between {@link #begin(TransactionContext)} and{@link #commit(TransactionContext)} or {@link #rollback(TransactionContext)}, as well as to share information with nested transactions.
Implementors may freely choose whether they support nested transactions. An example implementation supporting nested transactions is {@link DefaultTransactionProvider}, which implements such transactions using JDBC {@link Savepoint}s. @author Lukas Eder
|
|