public class RegistryManagedRuntime extends Object implements ManagedRuntime
ManagedRuntime interface that uses
the TransactionSynchronizationRegistry interface (new in JTA 1.1)
to create a TransactionManager facade for controlling transactions.| Modifier and Type | Class and Description |
|---|---|
class |
RegistryManagedRuntime.TransactionManagerRegistryFacade
A
TransactionManager and Transaction facade
that delegates the appropriate methods to the internally-held
TransactionSynchronizationRegistry. |
| Constructor and Description |
|---|
RegistryManagedRuntime() |
| Modifier and Type | Method and Description |
|---|---|
void |
doNonTransactionalWork(Runnable runnable)
RegistryManagedRuntime cannot suspend transactions.
|
String |
getRegistryName() |
Throwable |
getRollbackCause()
Returns the Throwable that caused the current transaction to be
marked for rollback, provided that any exists.
|
Object |
getTransactionKey()
Returns a transaction key that can be used to associate transactions
and Brokers.
|
TransactionManager |
getTransactionManager()
Return the cached TransactionManager instance.
|
void |
setRegistryName(String registryName) |
void |
setRollbackOnly(Throwable cause)
Sets the rollback only flag on the current transaction.
|
public TransactionManager getTransactionManager() throws Exception
getTransactionManager in interface ManagedRuntimeExceptionpublic void setRollbackOnly(Throwable cause) throws Exception
ManagedRuntimesetRollbackOnly in interface ManagedRuntimecause - the Throwable that caused the transaction to be
marked for rollback, or null of none is knownExceptionpublic Throwable getRollbackCause() throws Exception
ManagedRuntimegetRollbackCause in interface ManagedRuntimeExceptionpublic void setRegistryName(String registryName)
public String getRegistryName()
public Object getTransactionKey() throws Exception, SystemException
ManagedRuntimegetTransactionKey in interface ManagedRuntimeExceptionSystemExceptionpublic void doNonTransactionalWork(Runnable runnable) throws NotSupportedException
RegistryManagedRuntime cannot suspend transactions.
doNonTransactionalWork in interface ManagedRuntimerunnable - The runnable wrapper for the work that will be done. The
runnable object should be fully initialized with any state
needed to execute.NotSupportedException - if the transaction can not be suspended.Copyright © 2006–2020 Apache Software Foundation. All rights reserved.