Package io.helidon.integrations.jta.weld
Class NarayanaTransactionServices
java.lang.Object
io.helidon.integrations.jta.weld.NarayanaTransactionServices
- All Implemented Interfaces:
Service,TransactionServices
A
TransactionServices implementation that uses the Narayana transaction
engine and does not use JNDI.
TransactionServices implementations are used by Weld for transactional observer notification as well as
for providing the implementation backing the built-in UserTransaction CDI bean.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Only intended for service loader, do not instantiate -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanup()Releases any internal resources acquired during the lifespan of this object.Returns theUserTransactionpresent in this environment by invoking theUserTransaction.userTransaction()method and returning its result.booleanvoidregisterSynchronization(Synchronization synchronization) Registers the suppliedSynchronizationwith the currentTransaction.
-
Constructor Details
-
NarayanaTransactionServices
Deprecated.Only intended for service loader, do not instantiateCreates a newNarayanaTransactionServices.
-
-
Method Details
-
getUserTransaction
Returns theUserTransactionpresent in this environment by invoking theUserTransaction.userTransaction()method and returning its result.This method never returns
null.The return value of this method is used as the backing implementation of the built-in
UserTransactionCDI bean.- Specified by:
getUserTransactionin interfaceTransactionServices- Returns:
- the non-
nullUserTransactionpresent in this environment - See Also:
-
isTransactionActive
public boolean isTransactionActive()Returnstrueif the currentTransactionhas a status indicating that it is active.This method returns
trueif the currentTransactionhas a status equal to one of the following values:- Specified by:
isTransactionActivein interfaceTransactionServices- Returns:
trueif the currentTransactionhas a status indicating that it is active;falseotherwise- Throws:
RuntimeException- if an invocation of theTransaction.getStatus()method resulted in aSystemException- See Also:
-
registerSynchronization
Registers the suppliedSynchronizationwith the currentTransaction.- Specified by:
registerSynchronizationin interfaceTransactionServices- Throws:
RuntimeException- if an invocation of theTransactionManager.getTransaction()method resulted in aSystemException, or if an invocation of theTransaction.registerSynchronization(Synchronization)method resulted in either aSystemExceptionor aRollbackException- See Also:
-
cleanup
public void cleanup()Releases any internal resources acquired during the lifespan of this object.
-