Uploaded image for project: 'ServiceMix Components'
  1. ServiceMix Components
  2. SMXCOMP-816

Only use Fault message in JBI if the Camel out message has the fault flag set

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • servicemix-camel-2010.01
    • 2010.02
    • servicemix-camel
    • None

    Description

      The Camel API no longer has a dedicated Fault message, instead it uses the Out message with a flag set on it to indicate it's a fault. We should take that into account when replying to the JBI MessageExchange in case of a failure.

      Our current implementation is broken when a route returns an Out message (non-fault) and throws an Exception as well, e.g. breaking a route like

      from("direct:test")
           .doTry()
                .to("log:Starting JBI Test")
                .to("jbi:endpoint:urn:testcase:testing?mep=in-out")
           .doCatch(SerialException.class)
                .to("log:Caught Serial exception")
           .end();
      
      from("jbi:endpoint:urn:testcase:testing?mep=in-out")
           .errorHandler(noErrorHandler())
           .to("log:about to throw exception?level=ERROR")
           .throwException(new SerialException("Test"));
      

      Attachments

        Activity

          People

            gertvanthienen Gert Vanthienen
            gertvanthienen Gert Vanthienen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: