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.si...@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: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to