Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-4795

onCompletion handler no longer has access to exception in Camel 2.15

XMLWordPrintable

    • % %
    • 6.3 Sprint 1 (4-Jan->29-Jan)

      Between Fuse 6.1 and Fuse 6.2 (Camel 2.12 and Camel 2.15) the way that onCompletion handlers are implemented in Camel has changed, such that applications that need access no longer have access to the exception that caused the exchange to terminate, if there was an exception. In 2.12, and application's onCompletion handler could call exchange.getException() to get the exception that finished the exchange, but now the exception is specifically nulled out.

      See the source code OnCompletionProcessor.java:

      protected static void doProcess(Processor processor, Exchange exchange) {
              Object caught = exchange.removeProperty(Exchange.EXCEPTION_CAUGHT);
              //...
              exchange.setException(null);
      

      Note that the EXCEPTION_CAUGHT header is also removed so (presumably) the original exception cannot be obtained from this header.

            janstey@redhat.com Jonathan Anstey
            rhn-support-kboone Kevin Boone
            Viliam Kasala Viliam Kasala
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: