THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Wiki Markup |
---|
{snippet:id=e1|lang=xml|url=activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/exceptionBuilderWithRetryLoggingLevelSet.xml} |
Available as of Camel 1.5.1 or later
You can reference a RedeliveryPolicy
so you can reuse existing configurations and use standard spring bean style configuration that supports property placeholders.
Code Block | ||||
---|---|---|---|---|
| ||||
<bean id="myRedeliveryPolicy" class="org.apache.camel.processor.RedeliveryPolicy">
<property name="maximumRedeliveries" value="${myprop.max}"/>
</bean>
<onException>
<!-- you can define multiple exceptions just adding more exception elements as show below -->
<exception>com.mycompany.MyFirstException</exception>
<exception>com.mycompany.MySecondException</exception>
<!-- here we reference our redelivy policy defined above -->
<redeliveryPolicy ref="myRedeliveryPolicy"/>
</onException>
|
Exception Policy Strategy
...