Top Description Methods
org.jooq

public Interface ContextTransactionalCallable<T>

Annotations
@FunctionalInterface
Imports
org.jooq.impl.ThreadLocalTransactionProvider

An FunctionalInterface that wraps transactional code.

This callable may depend on captured scope ("context") in order to discover a contextual Configuration to be used to create new SQL statements. Clients are responsible to implement such context state in appropriate ConnectionProvider and TransactionProvider implementations.

An out-of-the-box implementation for a fitting TransactionProvider is available through ThreadLocalTransactionProvider.

Author
Lukas Eder

Method Summary

Modifier and TypeMethod and Description
public T

Returns:

The outcome of the transaction.
run
()

Run the transactional code.

Method Detail

runback to summary
public T run() throws Throwable

Run the transactional code.

If this method completes normally, and this is not a nested transaction, then the transaction will be committed. If this method completes with an exception (any Throwable), then the transaction is rolled back to the beginning of this ContextTransactionalCallable.

Returns:T

The outcome of the transaction.

Exceptions
Throwable:
Any exception that will cause a rollback of the code contained in this transaction. If this is a nested transaction, the rollback may be performed only to the state before executing this ContextTransactionalCallable.