Hi

The webpage states that the Exchange has to be *on route*
http://camel.apache.org/intercept

Sending using producer template is not on route.

On Mon, Jun 20, 2011 at 4:33 PM, Sander Mak <[email protected]> wrote:
> Hi all,
>
> I'm trying to test an onException handler of my route by intercepting
> a send on the main route and throwing an appropriate exception so that
> the onException handling  is triggered. However, I ran into some
> unexpected behavior. A simplified testcase reproduces this behavior:
> http://pastebin.com/L5Wuuy4P
>
> I expect that the interceptSendToEndpoint on line 49 is triggered by
> the message that is sent on line 69 using a producer template.
> However, the interception is never performed, hence the exception is
> never thrown and the testcase fails with "Success" != "Error".
>
> However, while experimenting a bit I found out that I could get the
> testcase to succeed by introducing a dummy direct endpoint in my main
> route, and intercepting that endpoint instead of the activemq
> endpoint: http://pastebin.com/PdK6gTNb  (diff with previous failing
> testcase: http://pastebin.com/vdHghPB1 )
>
> For me this was unexpected. How can I get my original testcase to
> succeed without altering my route?
>
>
> Thanks,
>
> Sander
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to