camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From greenbean <Kevin.Urci...@ngc.com>
Subject ExceptionPolicyStrategy In Spring XML
Date Mon, 11 Aug 2008 14:51:58 GMT

Can someone give me an example of configuring an ExceptionPolicyStrategy in
Spring XML?  I see the example below on the web.  However, I am not sure how
that translates to Spring XML.

exception(NullPointerException.class)
    .maximumRedeliveries(1)
    .setHeader(MESSAGE_INFO, constant("Damm a NPE"))
    .to(ERROR_QUEUE);

exception(IOException.class)
    .initialRedeliveryDelay(5000L)
    .maximumRedeliveries(3)
    .backOffMultiplier(1.0)
    .useExponentialBackOff()
    .setHeader(MESSAGE_INFO, constant("Damm somekind of IO exception"))
    .to(ERROR_QUEUE);

exception(Exception.class)
    .initialRedeliveryDelay(1000L)
    .maximumRedeliveries(2)
    .setHeader(MESSAGE_INFO, constant("Damm just exception"))
    .to(ERROR_QUEUE);

Thanks
-- 
View this message in context: http://www.nabble.com/ExceptionPolicyStrategy-In-Spring-XML-tp18927372s22882p18927372.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message