Package io.helidon.integrations.jta.cdi
Class DelegatingTransactionManager
java.lang.Object
io.helidon.integrations.jta.cdi.DelegatingTransactionManager
- All Implemented Interfaces:
TransactionManager
@Deprecated(forRemoval=true)
public abstract class DelegatingTransactionManager
extends Object
implements TransactionManager
Deprecated, for removal: This API element is subject to removal in a future version.
An equivalent class now exists in Narayana itself.
An
abstract TransactionManager implementation that
delegates all method invocations to another TransactionManager.
Design Notes
This class is public for convenience. It is extended by
other non-public internal classes.
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDeprecated, for removal: This API element is subject to removal in a future version.Creates a newDelegatingTransactionManager. -
Method Summary
Modifier and TypeMethodDescriptionvoidbegin()Deprecated, for removal: This API element is subject to removal in a future version.Creates a new transaction and associates it with the current thread.voidcommit()Deprecated, for removal: This API element is subject to removal in a future version.Completes the transaction associated with the current thread.intDeprecated, for removal: This API element is subject to removal in a future version.Returns the status of the transaction associated with the current thread.Deprecated, for removal: This API element is subject to removal in a future version.Returns theTransactionobject that represents the transaction context of the calling thread.voidresume(Transaction transaction) Deprecated, for removal: This API element is subject to removal in a future version.Resumes the transaction context association of the calling thread with the transaction represented by the suppliedTransactionobject.voidrollback()Deprecated, for removal: This API element is subject to removal in a future version.Rolls back the transaction associated with the current thread.voidDeprecated, for removal: This API element is subject to removal in a future version.Irrevocably modifies the transaction associated with the current thread such that the only possible outcome is for it to roll back.voidsetTransactionTimeout(int seconds) Deprecated, for removal: This API element is subject to removal in a future version.Sets the timeout value that is associated with transactions started by the current thread with thebegin()method.suspend()Deprecated, for removal: This API element is subject to removal in a future version.Suspends the transaction currently associated with the calling thread and returns aTransactionthat represents the transaction context being suspended, ornullif the calling thread is not associated with a transaction.
-
Constructor Details
-
DelegatingTransactionManager
Deprecated, for removal: This API element is subject to removal in a future version.Creates a newDelegatingTransactionManager.- Parameters:
delegate- theTransactionManagerto which all method invocations will be delegated; may benull, but then aSystemExceptionwill be thrown by every method in this class when invoked
-
-
Method Details
-
begin
Deprecated, for removal: This API element is subject to removal in a future version.Creates a new transaction and associates it with the current thread.- Specified by:
beginin interfaceTransactionManager- Throws:
NotSupportedException- if the thread is already associated with a transaction and thisTransactionManagerimplementation does not support nested transactionsSystemException- if thisTransactionManagerencounters an unexpected error condition
-
commit
public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SystemExceptionDeprecated, for removal: This API element is subject to removal in a future version.Completes the transaction associated with the current thread.When this method completes, the thread is no longer associated with a transaction.
- Specified by:
commitin interfaceTransactionManager- Throws:
RollbackException- if the transaction has been rolled back rather than committedHeuristicMixedException- if a heuristic decision was made and that some relevant updates have been committed while others have been rolled backHeuristicRollbackException- if a heuristic decision was made and all relevant updates have been rolled backSecurityException- if the thread is not allowed to commit the transactionIllegalStateException- if the current thread is not associated with a transactionSystemException- if thisTransactionManagerencounters an unexpected error condition
-
getStatus
Deprecated, for removal: This API element is subject to removal in a future version.Returns the status of the transaction associated with the current thread.- Specified by:
getStatusin interfaceTransactionManager- Returns:
- the transaction status expressed as the value of one of
the
intconstants in theStatusclass; if no transaction is associated with the current thread, this method returnsStatus.STATUS_NO_TRANSACTION - Throws:
SystemException- if thisTransactionManagerencounters an unexpected error condition- See Also:
-
getTransaction
Deprecated, for removal: This API element is subject to removal in a future version.Returns theTransactionobject that represents the transaction context of the calling thread.This method never returns
null.- Specified by:
getTransactionin interfaceTransactionManager- Returns:
- the
Transactionobject representing the transaction associated with the calling thread; nevernull - Throws:
SystemException- if thisTransactionManagerencounters an unexpected error condition
-
resume
Deprecated, for removal: This API element is subject to removal in a future version.Resumes the transaction context association of the calling thread with the transaction represented by the suppliedTransactionobject.When this method returns, the calling thread is associated with the transaction context specified.
- Specified by:
resumein interfaceTransactionManager- Parameters:
transaction- theTransactionrepresenting the transaction to be resumed; must not benull- Throws:
InvalidTransactionException- iftransactionis invalidIllegalStateException- if the thread is already associated with another transactionSystemException- if thisTransactionManagerencounters an unexpected error condition
-
rollback
Deprecated, for removal: This API element is subject to removal in a future version.Rolls back the transaction associated with the current thread.When this method completes, the thread is no longer associated with a transaction.
- Specified by:
rollbackin interfaceTransactionManager- Throws:
SecurityException- if the thread is not allowed to roll back the transactionIllegalStateException- if the current thread is not associated with a transactionSystemException- if thisTransactionManagerencounters an unexpected error condition
-
setRollbackOnly
Deprecated, for removal: This API element is subject to removal in a future version.Irrevocably modifies the transaction associated with the current thread such that the only possible outcome is for it to roll back.- Specified by:
setRollbackOnlyin interfaceTransactionManager- Throws:
IllegalStateException- if the current thread is not associated with a transactionSystemException- if thisTransactionManagerencounters an unexpected error condition
-
setTransactionTimeout
Deprecated, for removal: This API element is subject to removal in a future version.Sets the timeout value that is associated with transactions started by the current thread with thebegin()method.If an application has not called this method, the transaction service uses some default value for the transaction timeout.
- Specified by:
setTransactionTimeoutin interfaceTransactionManager- Parameters:
seconds- the timeout in seconds; if the value is zero, the transaction service restores the default value; if the value is negative aSystemExceptionis thrown- Throws:
SystemException- if thisTransactionManagerencounters an unexpected error condition or ifsecondsis less than zero
-
suspend
Deprecated, for removal: This API element is subject to removal in a future version.Suspends the transaction currently associated with the calling thread and returns aTransactionthat represents the transaction context being suspended, ornullif the calling thread is not associated with a transaction.This method may return
null.When this method returns, the calling thread is no longer associated with a transaction.
- Specified by:
suspendin interfaceTransactionManager- Returns:
- a
Transactionrepresenting the suspended transaction, ornull - Throws:
SystemException- if thisTransactionManagerencounters an unexpected error condition
-