hi, 

I want to setup a global TransactionErrorHandler to handle all the exception
in my routes, and it's also need to link with a customized processor, in
which I could do anything with the exception, for example, log the exception
into database.

the following is what I suppose to achieve:

        <bean id="exceptionHandler"
class="org.apache.camel.spring.spi.TransactionErrorHandlerBuilder" >
                <property name="failureProcessor"
ref="customizedEexceptionProcessor"></property>
        </bean>
        <bean id="customizedEexceptionProcessor"
                class="log.exception.to.database">
        </bean>
        <camel:camelContext xmlns="http://camel.apache.org/schema/spring";
errorHandlerRef="customizedExceptionHandler">
                <camel:route>
                        <camel:from uri="direct:start"/>
                        <camel:transacted/>
                        <to uri="jms:requests?disableReplyTo=true"/>
                        <camel:bean
ref="throwExceptionForcelyProcessor"></camel:bean>
                </camel:route>
        </camel:camelContext>

--
View this message in context: 
http://camel.465427.n5.nabble.com/How-could-I-use-TransactionErrorHandler-with-a-customized-FailureProcessor-tp5709813.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to