public final class RemoteTransactionContext extends Object implements org.wildfly.common.context.Contextual<RemoteTransactionContext>
| Constructor and Description |
|---|
RemoteTransactionContext(ClassLoader classLoader)
Construct a new instance.
|
RemoteTransactionContext(List<RemoteTransactionProvider> providers)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
static org.wildfly.common.context.ContextManager<RemoteTransactionContext> |
getContextManager()
Get the remote transaction context manager.
|
static RemoteTransactionContext |
getInstance()
Get the active remote transaction context instance.
|
org.wildfly.common.context.ContextManager<RemoteTransactionContext> |
getInstanceContextManager() |
<T> T |
getProviderInterface(URI location,
Class<T> clazz) |
UserTransaction |
getUserTransaction(URI location)
Get a
UserTransaction that controls a remote transactions state at the given location. |
DelayedEnlistmentHandle |
outflowTransaction(URI location,
Transaction transaction,
Xid xid)
Outflow the current
TransactionManager Transaction to the given location. |
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 RemoteTransactionContext(ClassLoader classLoader)
classLoader - the class loader to scan for transaction providers (null indicates the application or bootstrap class loader)public RemoteTransactionContext(List<RemoteTransactionProvider> providers)
providers - the list of providers to use (must not be null or empty)public static org.wildfly.common.context.ContextManager<RemoteTransactionContext> getContextManager()
public org.wildfly.common.context.ContextManager<RemoteTransactionContext> getInstanceContextManager()
getInstanceContextManager in interface org.wildfly.common.context.Contextual<RemoteTransactionContext>public static RemoteTransactionContext getInstance()
null)public UserTransaction getUserTransaction(URI location)
UserTransaction that controls a remote transactions state at the given location. The transaction
context may cache these instances by location.location - the location (must not be null)UserTransaction (not null)public DelayedEnlistmentHandle outflowTransaction(URI location, Transaction transaction, Xid xid) throws SystemException, IllegalStateException, UnsupportedOperationException, RollbackException
TransactionManager Transaction to the given location. The returned handle
must be used to confirm or forget the enlistment attempt either immediately or at some point in the future;
failure to do so may cause the transaction to be rolled back with an error.location - the location to outflow to (must not be null)transaction - the transaction (must not be null)xid - the transaction XID (must not be null, the branch qualifier is ignored)null)SystemException - if the transaction manager fails for some reasonRollbackException - if the transaction has been rolled back in the meantimeIllegalStateException - if no transaction is activeUnsupportedOperationException - if the provider for the location does not support outflowCopyright © 2016 JBoss by Red Hat. All rights reserved.