public interface SimpleTransactionControl
Modifier and Type | Method and Description |
---|---|
void |
commit()
Commit this transaction.
|
<T> T |
getProviderInterface(Class<T> providerInterfaceType)
Get a provider-specific interface from this transaction controller.
|
static SimpleTransactionControl |
of(Transaction transaction)
A simple transaction control facade over a transaction manager
Transaction object. |
void |
rollback()
Roll back this transaction.
|
default void |
safeRollback()
Safely roll back a transaction without throwing an exception; useful in cases where rollback failure is unrecoverable.
|
default void |
setRollbackOnly()
Set the transaction to be rollback-only.
|
void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, SystemException
RollbackException
- if the transaction was rolled back rather than committedHeuristicMixedException
- if a heuristic decision was made resulting in a mix of committed and rolled back resourcesHeuristicRollbackException
- if a heuristic decision was made and all resources were rolled backSecurityException
- if the current thread or user is not authorized to modify the transactionSystemException
- if there is an unexpected error conditionvoid rollback() throws SecurityException, SystemException
SecurityException
- if the current thread or user is not authorized to modify the transactionSystemException
- if there is an unexpected error conditiondefault void setRollbackOnly() throws SystemException
rollback()
after this method, so its implementation is optional, however it may be useful to hint to the remote system that
the transaction will only be rolled back.SystemException
- if an unexpected error occursdefault void safeRollback()
static SimpleTransactionControl of(Transaction transaction)
Transaction
object.transaction
- the transaction (must not be null
)null
)<T> T getProviderInterface(Class<T> providerInterfaceType)
T
- the provider interface typeproviderInterfaceType
- the provider interface type class (must not be null
)null
if the given type isn't supported by this transaction's providerCopyright © 2017 JBoss by Red Hat. All rights reserved.