public class TransactionalExecutionTemplate<T> extends Object implements ExecutionTemplate<T>
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| Modifier and Type | Method and Description |
|---|---|
static <T> TransactionalExecutionTemplate<T> |
createTransactionalExecutionTemplate(MuleContext muleContext,
TransactionConfig transactionConfig)
Creates a ExecutionTemplate that will manage transactional context according to configured TransactionConfig
|
T |
execute(ExecutionCallback<T> executionCallback) |
public static <T> TransactionalExecutionTemplate<T> createTransactionalExecutionTemplate(MuleContext muleContext, TransactionConfig transactionConfig)
muleContext - MuleContext for this applicationtransactionConfig - transaction config for the execution contextpublic T execute(ExecutionCallback<T> executionCallback) throws Exception
execute in interface ExecutionTemplate<T>ExceptionCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.