|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.openjpa.ee.AbstractManagedRuntime
org.apache.openjpa.ee.AutomaticManagedRuntime
public class AutomaticManagedRuntime
Implementation of the ManagedRuntime interface that searches
through a set of known JNDI locations and method invocations to locate the
appropriate mechanism for obtaining a TransactionManager.
Built in support is provided for the following Application Servers:
| Constructor Summary | |
|---|---|
AutomaticManagedRuntime()
|
|
| Method Summary | |
|---|---|
void |
doNonTransactionalWork(java.lang.Runnable runnable)
Delegate nonTransactional work to the appropriate managed runtime. |
void |
endConfiguration()
|
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 TransactionManager for the managed runtime. |
void |
setConfiguration(Configuration conf)
|
void |
setRollbackOnly(java.lang.Throwable cause)
Sets the rollback only flag on the current transaction. |
void |
startConfiguration()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AutomaticManagedRuntime()
| Method Detail |
|---|
public javax.transaction.TransactionManager getTransactionManager()
throws java.lang.Exception
ManagedRuntime
getTransactionManager in interface ManagedRuntimejava.lang.Exceptionpublic void setConfiguration(Configuration conf)
setConfiguration in interface Configurablepublic void startConfiguration()
startConfiguration in interface Configurablepublic void endConfiguration()
endConfiguration in interface Configurable
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.Exception
public java.lang.Object getTransactionKey()
throws java.lang.Exception,
javax.transaction.SystemException
AbstractManagedRuntime
getTransactionKey in interface ManagedRuntimegetTransactionKey in class AbstractManagedRuntimejava.lang.Exception
javax.transaction.SystemException
public void doNonTransactionalWork(java.lang.Runnable runnable)
throws javax.transaction.NotSupportedException
AbstractManagedRuntime.
doNonTransactionalWork in interface ManagedRuntimedoNonTransactionalWork in class AbstractManagedRuntimerunnable - 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 current transaction can not be obtained, or an error
occurs when suspending or resuming the transaction.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||