Package io.quarkus.narayana.jta.runtime
Class NotifyingTransactionManager
java.lang.Object
io.quarkus.narayana.jta.runtime.TransactionScopedNotifier
io.quarkus.narayana.jta.runtime.NotifyingTransactionManager
- All Implemented Interfaces:
jakarta.transaction.TransactionManager,Serializable
public class NotifyingTransactionManager
extends TransactionScopedNotifier
implements jakarta.transaction.TransactionManager, Serializable
A delegating transaction manager which receives an instance of Narayana transaction manager
and delegates all calls to it.
On top of it the implementation adds the CDI events processing for
TransactionScoped.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class io.quarkus.narayana.jta.runtime.TransactionScopedNotifier
TransactionScopedNotifier.TransactionId -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbegin()OverridesTransactionManager.begin()to additionally fire anObjectrepresenting the initialization of the transaction scope.voidcommit()OverridesTransactionManager.commit()to additionally fire anObjectrepresenting the before destruction and the destruction of the transaction scope.intjakarta.transaction.TransactionintReturns transaction timeout in seconds.voidresume(jakarta.transaction.Transaction transaction) voidrollback()OverridesTransactionManager.rollback()to additionally fire anObjectrepresenting the before destruction and the destruction of the transaction scope.voidvoidsetTransactionTimeout(int seconds) jakarta.transaction.Transactionsuspend()Methods inherited from class io.quarkus.narayana.jta.runtime.TransactionScopedNotifier
beforeDestroyed, destroyed, getTransactionId, initialized
-
Constructor Details
-
NotifyingTransactionManager
NotifyingTransactionManager()
-
-
Method Details
-
begin
public void begin() throws jakarta.transaction.NotSupportedException, jakarta.transaction.SystemExceptionOverridesTransactionManager.begin()to additionally fire anObjectrepresenting the initialization of the transaction scope.- Specified by:
beginin interfacejakarta.transaction.TransactionManager- Throws:
jakarta.transaction.NotSupportedExceptionjakarta.transaction.SystemException- See Also:
-
TransactionManager.begin()
-
commit
public void commit() throws jakarta.transaction.RollbackException, jakarta.transaction.HeuristicMixedException, jakarta.transaction.HeuristicRollbackException, SecurityException, IllegalStateException, jakarta.transaction.SystemExceptionOverridesTransactionManager.commit()to additionally fire anObjectrepresenting the before destruction and the destruction of the transaction scope.- Specified by:
commitin interfacejakarta.transaction.TransactionManager- Throws:
jakarta.transaction.RollbackExceptionjakarta.transaction.HeuristicMixedExceptionjakarta.transaction.HeuristicRollbackExceptionSecurityExceptionIllegalStateExceptionjakarta.transaction.SystemException- See Also:
-
TransactionManager.commit()
-
rollback
public void rollback() throws IllegalStateException, SecurityException, jakarta.transaction.SystemExceptionOverridesTransactionManager.rollback()to additionally fire anObjectrepresenting the before destruction and the destruction of the transaction scope.- Specified by:
rollbackin interfacejakarta.transaction.TransactionManager- Throws:
IllegalStateExceptionSecurityExceptionjakarta.transaction.SystemException- See Also:
-
TransactionManager.rollback()
-
getStatus
public int getStatus() throws jakarta.transaction.SystemException- Specified by:
getStatusin interfacejakarta.transaction.TransactionManager- Throws:
jakarta.transaction.SystemException
-
getTransaction
public jakarta.transaction.Transaction getTransaction() throws jakarta.transaction.SystemException- Specified by:
getTransactionin interfacejakarta.transaction.TransactionManager- Throws:
jakarta.transaction.SystemException
-
resume
public void resume(jakarta.transaction.Transaction transaction) throws jakarta.transaction.InvalidTransactionException, IllegalStateException, jakarta.transaction.SystemException - Specified by:
resumein interfacejakarta.transaction.TransactionManager- Throws:
jakarta.transaction.InvalidTransactionExceptionIllegalStateExceptionjakarta.transaction.SystemException
-
setRollbackOnly
- Specified by:
setRollbackOnlyin interfacejakarta.transaction.TransactionManager- Throws:
IllegalStateExceptionjakarta.transaction.SystemException
-
setTransactionTimeout
public void setTransactionTimeout(int seconds) throws jakarta.transaction.SystemException - Specified by:
setTransactionTimeoutin interfacejakarta.transaction.TransactionManager- Throws:
jakarta.transaction.SystemException
-
getTransactionTimeout
public int getTransactionTimeout() throws jakarta.transaction.SystemExceptionReturns transaction timeout in seconds.- Returns:
- transaction timeout set currently
- Throws:
jakarta.transaction.SystemException- on an undefined error
-
suspend
public jakarta.transaction.Transaction suspend() throws jakarta.transaction.SystemException- Specified by:
suspendin interfacejakarta.transaction.TransactionManager- Throws:
jakarta.transaction.SystemException
-