Bug 1112059

Summary: Timeout occurs when setting handled(true) in Camel route's onException()
Product: [JBoss] JBoss Fuse Service Works 6 Reporter: Tadayoshi Sato <tasato>
Component: SwitchYardAssignee: Rob Cernich <rcernich>
Status: MODIFIED --- QA Contact: Matej Melko <mmelko>
Severity: high Docs Contact:
Priority: high    
Version: 6.0.0 GACC: rcernich, soa-p-jira
Target Milestone: DR3   
Target Release: 6.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1142876 (view as bug list) Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Reproducer none

Description Tadayoshi Sato 2014-06-23 04:45:35 UTC
Description of problem:
Platform BZ for https://issues.jboss.org/browse/SWITCHYARD-1927 & https://issues.jboss.org/browse/SWITCHYARD-1991

In a Camel route like the following, when an exception is thrown in the normal route and caught in the onException route, the message won't be replied back to the caller of the Camel service and thus eventually timeout exception happens at a service gateway binding:

        onException(Exception.class)
            .handled(true)
            .transform().simple("ERROR: ${exception.message}");

        from("switchyard://ProxyService")
            .handleFault()
            .to("switchyard://ReverseService")
            .transform().simple("OK: ${body}");

Note that this behaviour contradicts the normal behaviour of Camel [1], which is that the following onException clause can send a response back to the caller:

    onException(MyFunctionalException.class)
        .handled(true)
        .transform().constant("Sorry");

[1] https://access.redhat.com/site/documentation/en-US/Red_Hat_JBoss_Fuse/6.0/html/Implementing_Enterprise_Integration_Patterns/files/BasicPrinciples-ExceptionHandling-ExClause.html

Comment 1 Tadayoshi Sato 2014-06-23 04:48:15 UTC
Created attachment 911254 [details]
Reproducer

Comment 2 JBoss JIRA Server 2014-06-27 16:56:03 UTC
Keith Babo <kbabo> updated the status of jira SWITCHYARD-1927 to Closed