|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.openjpa.ee.RegistryManagedRuntime
public class RegistryManagedRuntime
Implementation of the ManagedRuntime interface that uses
the TransactionSynchronizationRegistry interface (new in JTA 1.1)
to create a TransactionManager facade for controlling transactions.
| Nested Class Summary | |
|---|---|
static class |
RegistryManagedRuntime.TransactionManagerRegistryFacade
A TransactionManager and Transaction facade
that delegates the appropriate methods to the internally-held
TransactionSynchronizationRegistry. |
| Constructor Summary | |
|---|---|
RegistryManagedRuntime()
|
|
| Method Summary | |
|---|---|
void |
doNonTransactionalWork(java.lang.Runnable runnable)
RegistryManagedRuntime cannot suspend transactions. |
java.lang.String |
getRegistryName()
|
java.lang.Throwable |
getRollbackCause()
Returns the Throwable that caused the current transaction to be marked for rollback, provided that any exists. |
java.lang.Object |
getTransactionKey()
Returns a transaction key that can be used to associate transactions and Brokers. |
javax.transaction.TransactionManager |
getTransactionManager()
Return the cached TransactionManager instance. |
void |
setRegistryName(java.lang.String registryName)
|
void |
setRollbackOnly(java.lang.Throwable cause)
Sets the rollback only flag on the current transaction. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RegistryManagedRuntime()
| Method Detail |
|---|
public javax.transaction.TransactionManager getTransactionManager()
throws java.lang.Exception
getTransactionManager in interface ManagedRuntimejava.lang.Exception
public void setRollbackOnly(java.lang.Throwable cause)
throws java.lang.Exception
ManagedRuntime
setRollbackOnly in interface ManagedRuntimecause - the Throwable that caused the transaction to be
marked for rollback, or null of none is known
java.lang.Exception
public java.lang.Throwable getRollbackCause()
throws java.lang.Exception
ManagedRuntime
getRollbackCause in interface ManagedRuntimejava.lang.Exceptionpublic void setRegistryName(java.lang.String registryName)
public java.lang.String getRegistryName()
public java.lang.Object getTransactionKey()
throws java.lang.Exception,
javax.transaction.SystemException
ManagedRuntime
getTransactionKey in interface ManagedRuntimejava.lang.Exception
javax.transaction.SystemException
public void doNonTransactionalWork(java.lang.Runnable runnable)
throws javax.transaction.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.
javax.transaction.NotSupportedException - if the transaction can not be suspended.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||