org.apache.camel.spring.spi
Class TransactionErrorHandlerBuilder

java.lang.Object
  extended by org.apache.camel.builder.ErrorHandlerBuilderSupport
      extended by org.apache.camel.spring.spi.TransactionErrorHandlerBuilder
All Implemented Interfaces:
ErrorHandlerBuilder, org.springframework.beans.factory.InitializingBean

public class TransactionErrorHandlerBuilder
extends ErrorHandlerBuilderSupport
implements org.springframework.beans.factory.InitializingBean

An error handler which will roll the exception back if there is an error rather than using the dead letter channel and retry logic. A delay is also used after a rollback

Version:
$Revision: 765920 $

Constructor Summary
TransactionErrorHandlerBuilder()
           
 
Method Summary
 void afterPropertiesSet()
           
 Processor createErrorHandler(RouteContext routeContext, Processor processor)
           
 TransactionErrorHandlerBuilder exceptionPolicyStrategy(ExceptionPolicyStrategy exceptionPolicyStrategy)
          Sets the exception policy to use
 ExceptionPolicyStrategy getExceptionPolicyStrategy()
          Sets the exception policy strategy to use for resolving the OnExceptionDefinition to use for a given thrown exception
 org.springframework.transaction.support.TransactionTemplate getTransactionTemplate()
           
 void setExceptionPolicyStrategy(ExceptionPolicyStrategy exceptionPolicyStrategy)
           
 void setSpringTransactionPolicy(SpringTransactionPolicy policy)
           
 void setTransactionTemplate(org.springframework.transaction.support.TransactionTemplate transactionTemplate)
           
 boolean supportTransacted()
           
 
Methods inherited from class org.apache.camel.builder.ErrorHandlerBuilderSupport
addErrorHandlers, configure, getErrorHandlers, setErrorHandlers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionErrorHandlerBuilder

public TransactionErrorHandlerBuilder()
Method Detail

getTransactionTemplate

public org.springframework.transaction.support.TransactionTemplate getTransactionTemplate()

supportTransacted

public boolean supportTransacted()
Specified by:
supportTransacted in interface ErrorHandlerBuilder

createErrorHandler

public Processor createErrorHandler(RouteContext routeContext,
                                    Processor processor)
                             throws Exception
Specified by:
createErrorHandler in interface ErrorHandlerBuilder
Throws:
Exception

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
Exception

setTransactionTemplate

public void setTransactionTemplate(org.springframework.transaction.support.TransactionTemplate transactionTemplate)

setSpringTransactionPolicy

public void setSpringTransactionPolicy(SpringTransactionPolicy policy)

getExceptionPolicyStrategy

public ExceptionPolicyStrategy getExceptionPolicyStrategy()
Sets the exception policy strategy to use for resolving the OnExceptionDefinition to use for a given thrown exception

Specified by:
getExceptionPolicyStrategy in interface ErrorHandlerBuilder
Overrides:
getExceptionPolicyStrategy in class ErrorHandlerBuilderSupport

setExceptionPolicyStrategy

public void setExceptionPolicyStrategy(ExceptionPolicyStrategy exceptionPolicyStrategy)
Specified by:
setExceptionPolicyStrategy in interface ErrorHandlerBuilder
Overrides:
setExceptionPolicyStrategy in class ErrorHandlerBuilderSupport

exceptionPolicyStrategy

public TransactionErrorHandlerBuilder exceptionPolicyStrategy(ExceptionPolicyStrategy exceptionPolicyStrategy)
Sets the exception policy to use

Overrides:
exceptionPolicyStrategy in class ErrorHandlerBuilderSupport


Copyright © 2009 Apache Software Foundation. All Rights Reserved.