public final class LocalTransactionContext extends Object implements org.wildfly.common.context.Contextual<LocalTransactionContext>
| Constructor and Description |
|---|
LocalTransactionContext(LocalTransactionProvider provider)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
LocalTransaction |
beginTransaction(int timeout)
Begin a new, local transaction.
|
ImportResult<LocalTransaction> |
findOrImportTransaction(Xid xid,
int timeout)
Attempt to import a transaction, which subsequently may be controlled by its XID or by the returned handle.
|
static org.wildfly.common.context.ContextManager<LocalTransactionContext> |
getContextManager()
Get the context manager.
|
static LocalTransactionContext |
getCurrent()
Get the current local transaction context.
|
org.wildfly.common.context.ContextManager<LocalTransactionContext> |
getInstanceContextManager()
Get the context manager; delegates to
getContextManager(). |
XARecoverable |
getRecoveryInterface()
Get the recovery interface for this context.
|
boolean |
importProviderTransaction()
Attempt to import a provider's current transaction as a local transaction.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrun, runAction, runBiConsumer, runBiFunction, runBiPredicate, runCallable, runConsumer, runExBiConsumer, runExBiFunction, runExBiPredicate, runExceptionAction, runExConsumer, runExFunction, runExIntFunction, runExLongFunction, runExPredicate, runFunction, runIntFunction, runLongFunction, runPredicatepublic LocalTransactionContext(LocalTransactionProvider provider)
provider - the local transaction provider@NotNull public static org.wildfly.common.context.ContextManager<LocalTransactionContext> getContextManager()
null)@NotNull public org.wildfly.common.context.ContextManager<LocalTransactionContext> getInstanceContextManager()
getContextManager().getInstanceContextManager in interface org.wildfly.common.context.Contextual<LocalTransactionContext>null)@NotNull public static LocalTransactionContext getCurrent()
null)@NotNull public LocalTransaction beginTransaction(int timeout) throws SystemException, SecurityException
timeout - the transaction timeout to use for this transactionnull)SystemException - if the transaction creation failed for some reasonSecurityException - if the caller is not authorized to create a local transaction in this context@NotNull public ImportResult<LocalTransaction> findOrImportTransaction(Xid xid, int timeout) throws XAException
xid - the XID of the transaction to import (must not be null)timeout - the transaction timeout to use, if newnull)XAException - if a problem occurred while importing the transactionpublic boolean importProviderTransaction()
throws SystemException,
NotSupportedException
true if the transaction was associated, false if the provider had no current transactionSystemException - if an error occurred acquiring the current transaction from the providerNotSupportedException - if the thread is already associated with a transaction@NotNull public XARecoverable getRecoveryInterface()
findOrImportTransaction(Xid, int).null)Copyright © 2017 JBoss by Red Hat. All rights reserved.