|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.openjpa.ee.AbstractManagedRuntime org.apache.openjpa.kernel.LocalManagedRuntime
class LocalManagedRuntime
Uses a local implementation of the TransactionManager
interface.
This manager is valid only for a single Broker
.
It duplicates non-managed transaction control.
Constructor Summary | |
---|---|
LocalManagedRuntime(Broker broker)
Constructor. |
Method Summary | |
---|---|
void |
begin()
|
void |
commit()
|
boolean |
delistResource(XAResource xaRes,
int flag)
|
boolean |
enlistResource(XAResource xaRes)
|
Throwable |
getRollbackCause()
Returns the Throwable that caused the current transaction to be marked for rollback, provided that any exists. |
int |
getStatus()
|
Transaction |
getTransaction()
|
TransactionManager |
getTransactionManager()
Return the TransactionManager for the managed runtime. |
void |
registerSynchronization(Synchronization sync)
|
void |
resume(Transaction tobj)
|
void |
rollback()
|
void |
setRollbackOnly()
|
void |
setRollbackOnly(Throwable cause)
Sets the rollback only flag on the current transaction. |
void |
setTransactionTimeout(int sec)
|
Transaction |
suspend()
|
Methods inherited from class org.apache.openjpa.ee.AbstractManagedRuntime |
---|
doNonTransactionalWork, getTransactionKey |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.openjpa.ee.ManagedRuntime |
---|
doNonTransactionalWork, getTransactionKey |
Constructor Detail |
---|
public LocalManagedRuntime(Broker broker)
Method Detail |
---|
public TransactionManager getTransactionManager()
ManagedRuntime
getTransactionManager
in interface ManagedRuntime
public void begin()
begin
in interface TransactionManager
public void commit()
commit
in interface Transaction
commit
in interface TransactionManager
public void rollback()
rollback
in interface Transaction
rollback
in interface TransactionManager
public void setRollbackOnly()
setRollbackOnly
in interface Transaction
setRollbackOnly
in interface TransactionManager
public void setRollbackOnly(Throwable cause)
ManagedRuntime
setRollbackOnly
in interface ManagedRuntime
cause
- the Throwable that caused the transaction to be
marked for rollback, or null of none is knownpublic Throwable getRollbackCause()
ManagedRuntime
getRollbackCause
in interface ManagedRuntime
public int getStatus()
getStatus
in interface Transaction
getStatus
in interface TransactionManager
public Transaction getTransaction()
getTransaction
in interface TransactionManager
public void resume(Transaction tobj) throws SystemException
resume
in interface TransactionManager
SystemException
public void setTransactionTimeout(int sec) throws SystemException
setTransactionTimeout
in interface TransactionManager
SystemException
public Transaction suspend() throws SystemException
suspend
in interface TransactionManager
SystemException
public boolean delistResource(XAResource xaRes, int flag) throws SystemException
delistResource
in interface Transaction
SystemException
public boolean enlistResource(XAResource xaRes) throws SystemException
enlistResource
in interface Transaction
SystemException
public void registerSynchronization(Synchronization sync)
registerSynchronization
in interface Transaction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |