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

Camel schema should not allow onException inside <split> component

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • 2.12.0.redhat-61379
    • 2.10.0-fuse-71-047
    • None
    • None

    Description

      Camel schema should not allow onException block inside the Camel Splitter.

      Since it is allowed, then processing of the onException block is executed no matter if there is an exception or not.

      Please find below a sample route and the output which demonstrate the behaviour.

      Sample route:

              <route>
                  <from uri="timer://foo?repeatCount=1"/>
                  <setBody>
      	            <constant>1,2,3</constant>
                  </setBody>
                  
                  <split>
                  	<tokenize token=","/>
                  	<onException>
      	            	<exception>java.lang.Exception</exception>
      	            	<handled><constant>false</constant></handled>
      	            	<log message="This message should not be logged if there is no exception"/>
                  	</onException>
                  	
                  	<log message="Hello World"/>
                  </split>
              </route>
      

      Output:

      29 juil. 2013 10:54:25,303 | INFO  | Camel (271-camel-39) thread #50 - timer://foo | route1 | 115 - org.apache.camel.camel-core - 2.10.0.redhat-60024 | This message should not be logged if there is no exception
      29 juil. 2013 10:54:25,303 | INFO  | Camel (271-camel-39) thread #50 - timer://foo | route1 | 115 - org.apache.camel.camel-core - 2.10.0.redhat-60024 | Hello World
      29 juil. 2013 10:54:25,303 | INFO  | Camel (271-camel-39) thread #50 - timer://foo | route1 | 115 - org.apache.camel.camel-core - 2.10.0.redhat-60024 | This message should not be logged if there is no exception
      29 juil. 2013 10:54:25,303 | INFO  | Camel (271-camel-39) thread #50 - timer://foo | route1 | 115 - org.apache.camel.camel-core - 2.10.0.redhat-60024 | Hello World
      29 juil. 2013 10:54:25,303 | INFO  | Camel (271-camel-39) thread #50 - timer://foo | route1 | 115 - org.apache.camel.camel-core - 2.10.0.redhat-60024 | This message should not be logged if there is no exception
      29 juil. 2013 10:54:25,303 | INFO  | Camel (271-camel-39) thread #50 - timer://foo | route1 | 115 - org.apache.camel.camel-core - 2.10.0.redhat-60024 | Hello World
      

      Attachments

        Issue Links

          Activity

            People

              cibsen@redhat.com Claus Ibsen
              adam.kovari Adam Kovari (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: