camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ychawla <>
Subject Propogate CXF Exception to Camel
Date Fri, 17 Feb 2012 00:13:55 GMT
Hello All,
Consider a simple camel route like this that invokes a one way service:

    <camel:route errorHandlerRef="myDeadLetterErrorHandler">
      <camel:from uri="inputDir"/>
                <camel:to uri="cxf:bean:myService?dataFormat=PAYLOAD"/>

If the endpoint you are invoking is down, CXF will throw an exception:

Caused by: Connection refused
        at Method)[:1.6.0_29]

I thought that the error handler that I set on the route would handle this
for me and I could configure the retries and retry interval.  However, this
exception never makes it back to the exchange on the route.

I tried to set up a CXF phase interceptor to handle this, but I was unable
to put the CXF exception onto the Camel exchange.  Please see this related
post on the CXF list for more details on the interceptor configuration:

I also tried to grab the out of band headers from the exchanges and check
the HTTP status for a 200 response, but these appear to only be available in
POJO mode.  I figured I could throw an exception for a status other than 200
since I have a one way service.

I find this strange.  Should an exception thrown in the CXF interceptor
chain makes it way back to the Camel exchange?  Am I missing something here?


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message