org.mule.execution
Class TransactionalErrorHandlingExecutionTemplate

java.lang.Object
  extended by org.mule.execution.TransactionalErrorHandlingExecutionTemplate
All Implemented Interfaces:
ExecutionTemplate<MuleEvent>

public class TransactionalErrorHandlingExecutionTemplate
extends Object
implements ExecutionTemplate<MuleEvent>

Creates an execution context that should be used when: - A flow execution starts because a message was received by a MessageReceiver - Any other entry point of execution with no parent execution context Created a ExecutionTemplate that 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


Method Summary
static TransactionalErrorHandlingExecutionTemplate createMainExecutionTemplate(MuleContext muleContext, MessagingExceptionHandler messagingExceptionHandler)
          Creates a TransactionalErrorHandlingExecutionTemplate to be used as first processing template in a flow using no transaction configuration
static TransactionalErrorHandlingExecutionTemplate createMainExecutionTemplate(MuleContext muleContext, TransactionConfig transactionConfig)
          Creates a TransactionalErrorHandlingExecutionTemplate to be used as first processing template in a flow using no particular exception listener.
static TransactionalErrorHandlingExecutionTemplate createMainExecutionTemplate(MuleContext muleContext, TransactionConfig transactionConfig, MessagingExceptionHandler messagingExceptionHandler)
          Creates a TransactionalErrorHandlingExecutionTemplate to be used as first processing template in a flow
static TransactionalErrorHandlingExecutionTemplate createScopeExecutionTemplate(MuleContext muleContext, TransactionConfig transactionConfig, MessagingExceptionHandler messagingExceptionHandler)
          Creates a TransactionalErrorHandlingExecutionTemplate for inner scopes within a flow
 MuleEvent execute(ExecutionCallback<MuleEvent> executionCallback)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createMainExecutionTemplate

public static TransactionalErrorHandlingExecutionTemplate createMainExecutionTemplate(MuleContext muleContext,
                                                                                      MessagingExceptionHandler messagingExceptionHandler)
Creates a TransactionalErrorHandlingExecutionTemplate to be used as first processing template in a flow using no transaction configuration

Parameters:
muleContext - MuleContext for this application
messagingExceptionHandler - exception listener to use for any MessagingException thrown

createMainExecutionTemplate

public static TransactionalErrorHandlingExecutionTemplate createMainExecutionTemplate(MuleContext muleContext,
                                                                                      TransactionConfig transactionConfig,
                                                                                      MessagingExceptionHandler messagingExceptionHandler)
Creates a TransactionalErrorHandlingExecutionTemplate to be used as first processing template in a flow

Parameters:
muleContext - MuleContext for this application
transactionConfig - Transaction configuration
messagingExceptionHandler - Exception listener for any MessagingException thrown

createMainExecutionTemplate

public static TransactionalErrorHandlingExecutionTemplate createMainExecutionTemplate(MuleContext muleContext,
                                                                                      TransactionConfig transactionConfig)
Creates a TransactionalErrorHandlingExecutionTemplate to be used as first processing template in a flow using no particular exception listener. Exception listener configured in the flow within this ExecutionTemplate is executed will be used.

Parameters:
muleContext - MuleContext for this application
transactionConfig - Transaction configuration

createScopeExecutionTemplate

public static TransactionalErrorHandlingExecutionTemplate createScopeExecutionTemplate(MuleContext muleContext,
                                                                                       TransactionConfig transactionConfig,
                                                                                       MessagingExceptionHandler messagingExceptionHandler)
Creates a TransactionalErrorHandlingExecutionTemplate for inner scopes within a flow

Parameters:
muleContext -
transactionConfig -
Returns:

execute

public MuleEvent execute(ExecutionCallback<MuleEvent> executionCallback)
                  throws Exception
Specified by:
execute in interface ExecutionTemplate<MuleEvent>
Throws:
Exception


Copyright © 2003-2014 MuleSoft, Inc.. All Rights Reserved.