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 forTransactionScoped.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.quarkus.narayana.jta.runtime.TransactionScopedNotifier
TransactionScopedNotifier.TransactionId
-
-
Constructor Summary
Constructors Constructor Description NotifyingTransactionManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbegin()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.intgetStatus()jakarta.transaction.TransactiongetTransaction()intgetTransactionTimeout()Returns 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.voidsetRollbackOnly()voidsetTransactionTimeout(int seconds)jakarta.transaction.Transactionsuspend()-
Methods inherited from class io.quarkus.narayana.jta.runtime.TransactionScopedNotifier
beforeDestroyed, destroyed, getTransactionId, initialized
-
-
-
-
Method Detail
-
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
public void setRollbackOnly() throws IllegalStateException, jakarta.transaction.SystemException- 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
-
-