public class TransactionErrorHandler
extends org.apache.camel.processor.errorhandler.RedeliveryErrorHandler
awaitManager, camelContext, customExchangeFormatter, deadLetter, deadLetterHandleNewException, deadLetterUri, exchangeFormatter, executorService, logger, onExceptionProcessor, onPrepareProcessor, output, outputAsync, preparingShutdown, reactiveExecutor, redeliveryEnabled, redeliveryPolicy, redeliveryProcessor, redeliverySleepCounter, retryWhilePolicy, shutdownStrategy, simpleTask, taskFactory, useOriginalBodyPolicy, useOriginalMessagePolicy| Constructor and Description |
|---|
TransactionErrorHandler(org.apache.camel.CamelContext camelContext,
org.apache.camel.Processor output,
org.apache.camel.spi.CamelLogger logger,
org.apache.camel.Processor redeliveryProcessor,
org.apache.camel.processor.errorhandler.RedeliveryPolicy redeliveryPolicy,
org.springframework.transaction.support.TransactionTemplate transactionTemplate,
org.apache.camel.Predicate retryWhile,
ScheduledExecutorService executorService,
org.apache.camel.LoggingLevel rollbackLoggingLevel,
org.apache.camel.Processor onExceptionOccurredProcessor)
Creates the transaction error handler.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.camel.spi.ErrorHandler |
clone(org.apache.camel.Processor output) |
protected void |
doInTransactionTemplate(org.apache.camel.Exchange exchange) |
void |
process(org.apache.camel.Exchange exchange) |
boolean |
process(org.apache.camel.Exchange exchange,
org.apache.camel.AsyncCallback callback) |
protected void |
processByErrorHandler(org.apache.camel.Exchange exchange)
Processes the
Exchange using the error handler. |
protected void |
processInTransaction(org.apache.camel.Exchange exchange) |
boolean |
supportTransacted() |
String |
toString() |
changeOutput, defensiveCopyExchangeIfNeeded, determineIfRedeliveryIsEnabled, determineRedeliveryDelay, doShutdown, doStart, doStop, getDeadLetter, getDeadLetterUri, getDefaultHandledPredicate, getLogger, getOutput, getRedeliveryPolicy, hasNext, isDeadLetterHandleNewException, isDone, isRunAllowedOnPreparingShutdown, isUseOriginalBodyPolicy, isUseOriginalMessagePolicy, next, prepareShutdown, processAsyncaddErrorHandler, addExceptionPolicy, getExceptionPolicy, isDeadLetterChanneladdChildService, removeChildService, shutdown, start, stopbuild, doBuild, doFail, doInit, doLifecycleChange, doResume, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, suspendclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic TransactionErrorHandler(org.apache.camel.CamelContext camelContext,
org.apache.camel.Processor output,
org.apache.camel.spi.CamelLogger logger,
org.apache.camel.Processor redeliveryProcessor,
org.apache.camel.processor.errorhandler.RedeliveryPolicy redeliveryPolicy,
org.springframework.transaction.support.TransactionTemplate transactionTemplate,
org.apache.camel.Predicate retryWhile,
ScheduledExecutorService executorService,
org.apache.camel.LoggingLevel rollbackLoggingLevel,
org.apache.camel.Processor onExceptionOccurredProcessor)
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 redeliverytransactionTemplate - the transaction templateretryWhile - retry whileexecutorService - the ScheduledExecutorService to be used for
redelivery thread pool. Can be null.rollbackLoggingLevel - logging level to use for logging transaction rollback occurredonExceptionOccurredProcessor - a custom Processor to process the
Exchange just after an exception was thrown.public org.apache.camel.spi.ErrorHandler clone(org.apache.camel.Processor output)
clone in class org.apache.camel.processor.errorhandler.ErrorHandlerSupportpublic boolean supportTransacted()
supportTransacted in class org.apache.camel.processor.errorhandler.RedeliveryErrorHandlerpublic void process(org.apache.camel.Exchange exchange)
process in interface org.apache.camel.Processorprocess in class org.apache.camel.processor.errorhandler.RedeliveryErrorHandlerpublic boolean process(org.apache.camel.Exchange exchange,
org.apache.camel.AsyncCallback callback)
process in interface org.apache.camel.AsyncProcessorprocess in class org.apache.camel.processor.errorhandler.RedeliveryErrorHandlerprotected void processInTransaction(org.apache.camel.Exchange exchange)
protected void doInTransactionTemplate(org.apache.camel.Exchange exchange)
protected void processByErrorHandler(org.apache.camel.Exchange exchange)
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.exchange - the exchangeApache Camel