class LocalManagedRuntime extends AbstractManagedRuntime implements ManagedRuntime, TransactionManager, Transaction
TransactionManager
interface.
This manager is valid only for a single Broker
.
It duplicates non-managed transaction control.Constructor and Description |
---|
LocalManagedRuntime(Broker broker)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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() |
doNonTransactionalWork, getTransactionKey
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
doNonTransactionalWork, getTransactionKey
public LocalManagedRuntime(Broker broker)
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
Copyright © 2006–2015 Apache Software Foundation. All rights reserved.