org.apache.camel.spring.spi
Class TransactionErrorHandler
java.lang.Object
org.apache.camel.impl.ServiceSupport
org.apache.camel.processor.ErrorHandlerSupport
org.apache.camel.processor.RedeliveryErrorHandler
org.apache.camel.spring.spi.TransactionErrorHandler
- All Implemented Interfaces:
- AsyncProcessor, Processor, ErrorHandler, Service, ShutdownableService
public class TransactionErrorHandler
- extends RedeliveryErrorHandler
The Transactional Client
EIP pattern.
- Version:
- $Revision: 959519 $
Methods inherited from class org.apache.camel.processor.RedeliveryErrorHandler |
deliverToFailureProcessor, deliverToOnRedeliveryProcessor, doStart, doStop, getDeadLetter, getDeadLetterUri, getLogger, getOutput, getRedeliveryPolicy, handleException, isDone, isUseOriginalMessagePolicy, prepareExchangeAfterFailure, prepareExchangeForContinue, prepareExchangeForRedelivery, processAsyncErrorHandler, processErrorHandler, shouldHandleException |
Methods inherited from class org.apache.camel.impl.ServiceSupport |
addChildService, doShutdown, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, removeChildService, shutdown, start, stop |
TransactionErrorHandler
public TransactionErrorHandler(CamelContext camelContext,
Processor output,
Logger logger,
Processor redeliveryProcessor,
RedeliveryPolicy redeliveryPolicy,
Predicate handledPolicy,
ExceptionPolicyStrategy exceptionPolicyStrategy,
TransactionTemplate transactionTemplate)
- Creates the transaction error handler.
- Parameters:
camelContext
- the camel contextoutput
- outer processor that should use this default error handlerlogger
- logger to use for logging failures and redelivery attemptsredeliveryProcessor
- an optional processor to run before redelivery attemptredeliveryPolicy
- policy for redeliveryhandledPolicy
- policy for handling failed exception that are moved to the dead letter queueexceptionPolicyStrategy
- strategy for onException handlingtransactionTemplate
- the transaction template
supportTransacted
public boolean supportTransacted()
- Overrides:
supportTransacted
in class RedeliveryErrorHandler
toString
public String toString()
- Overrides:
toString
in class Object
process
public void process(Exchange exchange)
throws Exception
- Specified by:
process
in interface Processor
- Overrides:
process
in class RedeliveryErrorHandler
- Throws:
Exception
process
public boolean process(Exchange exchange,
AsyncCallback callback)
- Specified by:
process
in interface AsyncProcessor
- Overrides:
process
in class RedeliveryErrorHandler
processInTransaction
protected void processInTransaction(Exchange exchange)
throws Exception
- Throws:
Exception
doInTransactionTemplate
protected void doInTransactionTemplate(Exchange exchange)
processByErrorHandler
protected void processByErrorHandler(Exchange exchange)
- Processes the
Exchange
using the error handler.
This implementation will invoke ensure this occurs synchronously, that means if the async routing engine
did kick in, then this implementation will wait for the task to complete before it continues.
- Parameters:
exchange
- the exchange
Copyright © 2007-2010 The Apache Software Foundation. All Rights Reserved.