public interface ManagedRuntime
Modifier and Type | Method and Description |
---|---|
void |
doNonTransactionalWork(Runnable runnable)
Do a unit of work which will execute outside of the current managed
transaction.
|
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 TransactionManager for the managed runtime.
|
void |
setRollbackOnly(Throwable cause)
Sets the rollback only flag on the current transaction.
|
TransactionManager getTransactionManager() throws Exception
Exception
void setRollbackOnly(Throwable cause) throws Exception
cause
- the Throwable that caused the transaction to be
marked for rollback, or null of none is knownException
Throwable getRollbackCause() throws Exception
Exception
Object getTransactionKey() throws Exception, SystemException
Exception
SystemException
void doNonTransactionalWork(Runnable runnable) throws NotSupportedException
Do a unit of work which will execute outside of the current managed transaction.
If the runnable object encounters an exception it should be wrapped in a RuntimeException and thrown back to the caller
runnable
- 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–2018 Apache Software Foundation. All rights reserved.