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() |
UserTransaction |
getUserTransaction(URI location)
Get a
UserTransaction that controls a remote transactions state at the given location. |
XAOutflowHandle |
outflowTransaction(URI location,
LocalTransaction transaction)
Outflow the given local transaction to the given location.
|
void |
registerCreationListener(CreationListener creationListener)
Register a transaction creation listener.
|
void |
removeCreationListener(CreationListener creationListener)
Remove a transaction creation listener.
|
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 void registerCreationListener(CreationListener creationListener)
creationListener - the creation listener (must not be null)public void removeCreationListener(CreationListener creationListener)
creationListener - the creation listener (must not be null)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 XAOutflowHandle outflowTransaction(URI location, LocalTransaction transaction) throws SystemException, IllegalStateException, UnsupportedOperationException, RollbackException
location - the location to outflow to (must not be null)transaction - the transaction (must not be null)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 © 2017 JBoss by Red Hat. All rights reserved.