Class JtaTransactionErrorHandler

java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.ChildServiceSupport
org.apache.camel.processor.errorhandler.ErrorHandlerSupport
org.apache.camel.processor.errorhandler.RedeliveryErrorHandler
org.apache.camel.jta.JtaTransactionErrorHandler
All Implemented Interfaces:
AutoCloseable, org.apache.camel.AsyncProcessor, org.apache.camel.Navigate<org.apache.camel.Processor>, org.apache.camel.Processor, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.ErrorHandler, org.apache.camel.spi.ErrorHandlerRedeliveryCustomizer, org.apache.camel.spi.ShutdownPrepared, org.apache.camel.StatefulService, org.apache.camel.SuspendableService

public class JtaTransactionErrorHandler extends org.apache.camel.processor.errorhandler.RedeliveryErrorHandler
This error handler does redelivering. If the transaction fails it can be retried if configured to do so. In the Spring implementation redelivering is done within the transaction which is not appropriate in JTA since every error breaks the current transaction.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.camel.processor.errorhandler.RedeliveryErrorHandler

    org.apache.camel.processor.errorhandler.RedeliveryErrorHandler.RedeliveryTask, org.apache.camel.processor.errorhandler.RedeliveryErrorHandler.SimpleTask
  • Field Summary

    Fields inherited from class 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

    Fields inherited from class org.apache.camel.processor.errorhandler.ErrorHandlerSupport

    DEFAULT_EXCHANGE_FORMATTER, exceptionPolicies, exceptionPolicy

    Fields inherited from class org.apache.camel.support.ChildServiceSupport

    childServices

    Fields inherited from class org.apache.camel.support.service.BaseService

    BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING
  • Constructor Summary

    Constructors
    Constructor
    Description
    JtaTransactionErrorHandler(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, JtaTransactionPolicy transactionPolicy, org.apache.camel.Predicate retryWhile, ScheduledExecutorService executorService, org.apache.camel.LoggingLevel rollbackLoggingLevel, org.apache.camel.Processor onExceptionOccurredProcessor)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.camel.spi.ErrorHandler
    clone(org.apache.camel.Processor output)
     
    boolean
    process(org.apache.camel.Exchange exchange, org.apache.camel.AsyncCallback callback)
     

    Methods inherited from class org.apache.camel.processor.errorhandler.RedeliveryErrorHandler

    changeOutput, defensiveCopyExchangeIfNeeded, determineIfRedeliveryIsEnabled, determineRedeliveryDelay, doShutdown, doStart, doStop, getDeadLetter, getDeadLetterUri, getDefaultHandledPredicate, getLogger, getOutput, getRedeliveryPolicy, hasNext, isDeadLetterHandleNewException, isDone, isRunAllowedOnPreparingShutdown, isUseOriginalBodyPolicy, isUseOriginalMessagePolicy, next, prepareShutdown, process, processAsync, supportTransacted

    Methods inherited from class org.apache.camel.processor.errorhandler.ErrorHandlerSupport

    addErrorHandler, addExceptionPolicy, getExceptionPolicy, isDeadLetterChannel

    Methods inherited from class org.apache.camel.support.ChildServiceSupport

    addChildService, removeChildService, shutdown, start, stop

    Methods inherited from class org.apache.camel.support.service.BaseService

    build, doBuild, doFail, doInit, doLifecycleChange, doResume, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, suspend

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.camel.Service

    build, close, init

    Methods inherited from interface org.apache.camel.StatefulService

    getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending

    Methods inherited from interface org.apache.camel.SuspendableService

    isSuspended, resume, suspend
  • Constructor Details

    • JtaTransactionErrorHandler

      public JtaTransactionErrorHandler(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, JtaTransactionPolicy transactionPolicy, org.apache.camel.Predicate retryWhile, ScheduledExecutorService executorService, org.apache.camel.LoggingLevel rollbackLoggingLevel, org.apache.camel.Processor onExceptionOccurredProcessor)
  • Method Details

    • clone

      public org.apache.camel.spi.ErrorHandler clone(org.apache.camel.Processor output)
      Specified by:
      clone in class org.apache.camel.processor.errorhandler.ErrorHandlerSupport
    • process

      public boolean process(org.apache.camel.Exchange exchange, org.apache.camel.AsyncCallback callback)
      Specified by:
      process in interface org.apache.camel.AsyncProcessor
      Overrides:
      process in class org.apache.camel.processor.errorhandler.RedeliveryErrorHandler