camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Problem with runTimeException handling.
Date Fri, 07 Jun 2013 07:25:45 GMT
Hi

You can use onException to catch and handle the runtime exception, and
there you can do set some "reply message" you want to caller to see.
And remember to set a status code of 500+ if you want to tell the
caller that there was some internal server error etc.

And no you cannot route to bean2 after sending back the reply message.

If you want to do so, you would need to use wire tap or the likes to
spin off a 2nd message.

On Thu, Jun 6, 2013 at 1:04 PM, suyash.singh <suyash.singh@gmail.com> wrote:
> Hi Claus,
>
> Thanks for the quick reply but I think I explained my problem incorrectly.
> So here I try again:
>
> 1) My route flows like HTTP Req -> Jetty -> Bean1 -> Bean 2 -> Route END.
> After this a HTTP reply goes back to sender.
> 2) Now say for e.g. during bean 1 I encounter a timer expiry. I handle this
> using runtime exception in which I want to do a HTTP reply back to sender to
> tell him of this expiry.
>
> Question is, can I get the Jetty context on a ad-hoc basis. Also can the
> route continue to Bean 2 after I send this reply.
>
>
> Hope I have done a better job this time
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Problem-with-runTimeException-handling-tp5733659p5733939.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
www.camelone.org: The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
View raw message