org.mule.execution
Class TransactionalExecutionTemplate<T>
java.lang.Object
org.mule.execution.TransactionalExecutionTemplate<T>
- All Implemented Interfaces:
- ExecutionTemplate<T>
public class TransactionalExecutionTemplate<T>
- extends Object
- implements ExecutionTemplate<T>
ExecutionTemplate created should be used on a MessageProcessor that are previously wrapper by
TransactionalErrorHandlingExecutionTemplate or ErrorHandlingExecutionTemplate
Should be used when:
An outbound endpoint is called
An outbound router is called
Any other MessageProcessor able to manage transactions is called
Instance of TransactionTemplate created by this method will:
Resolve non xa transactions created before it if the TransactionConfig action requires it
Suspend-Resume xa transaction created before it if the TransactionConfig action requires it
Start a transaction if required by TransactionConfig action
Resolve transaction if was started by this TransactionTemplate
Route any exception to exception strategy if it was not already routed to it
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
createTransactionalExecutionTemplate
public static <T> TransactionalExecutionTemplate<T> createTransactionalExecutionTemplate(MuleContext muleContext,
TransactionConfig transactionConfig)
- Creates a ExecutionTemplate that will manage transactional context according to configured TransactionConfig
- Parameters:
muleContext - MuleContext for this applicationtransactionConfig - transaction config for the execution context
execute
public T execute(ExecutionCallback<T> executionCallback)
throws Exception
- Specified by:
execute in interface ExecutionTemplate<T>
- Throws:
Exception
Copyright © 2003-2013 MuleSoft, Inc.. All Rights Reserved.