Uploaded image for project: 'FUSE Mediation Router'
  1. FUSE Mediation Router
  2. MR-770

Camel 2.10 Splitter behaviour change

    XMLWordPrintable

Details

    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.

      Attachments

        Activity

          People

            cibsen@redhat.com Claus Ibsen
            rhn-support-qluo Joe Luo
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: