Interface UserTransactionService
-
- All Known Subinterfaces:
TransactionService
- All Known Implementing Classes:
JTATransactionServiceImpl
public interface UserTransactionService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> TexecuteInTransaction(java.util.concurrent.Callable<T> callable)Execute the given callable inside a transaction.java.util.Optional<java.lang.Boolean>hasMultipleResources()booleanisTransactionActive()voidregisterBeforeCommitCallable(java.util.concurrent.Callable<java.lang.Void> callable)voidregisterBonitaSynchronization(javax.transaction.Synchronization txSync)Register a synchronization object for the transaction currently associated with the target object.
-
-
-
Method Detail
-
executeInTransaction
<T> T executeInTransaction(java.util.concurrent.Callable<T> callable) throws java.lang.ExceptionExecute the given callable inside a transaction.- Parameters:
callable-- Returns:
- Throws:
java.lang.Exception
-
registerBonitaSynchronization
void registerBonitaSynchronization(javax.transaction.Synchronization txSync) throws STransactionNotFoundExceptionRegister a synchronization object for the transaction currently associated with the target object. The transaction manager invokes the beforeCompletion method prior to starting the two-phase transaction commit process. After the transaction is completed, the transaction manager invokes the afterCompletion method.- Parameters:
txSync- The Synchronization object for the transaction associated with the target object.- Throws:
RollbackException- Thrown to indicate that the transaction has been marked for rollback only.java.lang.IllegalStateException- Thrown if the transaction in the target object is in the prepared state or the transaction is inactive.STransactionNotFoundException- Thrown if the transaction manager encounters an unexpected error condition.
-
registerBeforeCommitCallable
void registerBeforeCommitCallable(java.util.concurrent.Callable<java.lang.Void> callable) throws STransactionNotFoundException- Throws:
STransactionNotFoundException
-
isTransactionActive
boolean isTransactionActive()
-
hasMultipleResources
java.util.Optional<java.lang.Boolean> hasMultipleResources()
-
-