Details
-
Bug
-
Resolution: Done
-
Major
-
2.10.0.redhat-60024
-
None
-
None
Description
I have a unit test case to show a camel splitter behaviour change. Basically I have a fairly simple camel route like:
<bean id="nonHandledException" class="java.lang.Exception"> <constructor-arg index="0" value="NON-HANDLED"/> </bean> <!--bean id="addCompletion" class="org.jboss.fuse.example.AddCompletionProcessor"/--> <camelContext trace="true" xmlns="http://camel.apache.org/schema/spring"> <onException> <exception>java.lang.Exception</exception> <handled> <constant>false</constant> </handled> <log loggingLevel="WARN" message="CAUGHT NON-HANDLED EXCEPTION !"/> <to uri="mock:exception" /> </onException> <route id="test"> <from uri="direct:in"/> <log message="***** INPUT EXCHANGE : ${exchangeId} ******* "/> <!--call to add a synchronization --> <!--process ref="addCompletion"/--> <split stopOnException="true" shareUnitOfWork="false"> <tokenize token=","/> <setProperty propertyName="testProperty" > <constant>ChangedValue</constant> </setProperty> <!--call to add a synchronization --> <choice> <when> <simple>${body} == 'line2'</simple> <throwException ref="nonHandledException"/> </when> </choice> </split> </route> </camelContext>
In a route, I have a splitter with the "stopOnException" option. If an exception occurs during the split, I have noticed that some properties in the original exchange are overwritten by the failed exchange values.