Interface TransactionHandler
-
- All Known Implementing Classes:
TransactionHandlerImpl
public interface TransactionHandlerContains utility methods to run transactions. It is different from Spring'sTransactionTemplatebecause it handles the currentInvocationContext'sEntityManagerandCyclosException#shouldRollback()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> Pair<T,Boolean>run(TransactionLevel transactionLevel, TransactionCallback<T> callback)Runs the given transaction callback in the current thread, forcing there's no current transaction.
-
-
-
Method Detail
-
run
<T> Pair<T,Boolean> run(TransactionLevel transactionLevel, TransactionCallback<T> callback)
Runs the given transaction callback in the current thread, forcing there's no current transaction. The transaction will comply with the givenTransactionLevel.- Returns:
- a
Pairwith the callback's result and a boolean indicating if the transaction was committed or not.
-
-