Quantcast

Using advicewith to add interceptors to an existing route

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Using advicewith to add interceptors to an existing route

gilboy
Hi

When I use the intercept feature below, is it legal to use wildchar's in the endpoint?

Thanks
Joe

@Test
public void testSimulateErrorUsingInterceptors() throws Exception {
        RouteDefinition route = context.getRouteDefinitions().get(0);
        route.adviceWith(context, new RouteBuilder() {
        public void configure() throws Exception {
        interceptSendToEndpoint("jms:*")
        .skipSendToOriginalEndpoint()
        ..............
        ..............
        }
});
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Using advicewith to add interceptors to an existing route

Christian Mueller
Can you try 'jms:*' instead of '*jms:*' (if you use the protocol 'jms').
I think we only support wildcards at the end...

Best,
Christian

On Mon, Jul 2, 2012 at 6:21 PM, gilboy <[hidden email]> wrote:

> Hi
>
> When I use the intercept feature below, is it legal to use wildchar's in
> the
> endpoint?
>
> Thanks
> Joe
>
> @Test
> public void testSimulateErrorUsingInterceptors() throws Exception {
>         RouteDefinition route = context.getRouteDefinitions().get(0);
>         route.adviceWith(context, new RouteBuilder() {
>         public void configure() throws Exception {
>         interceptSendToEndpoint("*jms:*"*)
>         .skipSendToOriginalEndpoint()
>         ..............
>         ..............
>         }
> });
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Using-advicewith-to-add-interceptors-to-an-existing-route-tp5715363.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Using advicewith to add interceptors to an existing route

Claus Ibsen-2
In reply to this post by gilboy
On Mon, Jul 2, 2012 at 6:21 PM, gilboy <[hidden email]> wrote:
> Hi
>
> When I use the intercept feature below, is it legal to use wildchar's in the
> endpoint?
>

Yes read the docs
http://camel.apache.org/intercept



> Thanks
> Joe
>
> @Test
> public void testSimulateErrorUsingInterceptors() throws Exception {
>         RouteDefinition route = context.getRouteDefinitions().get(0);
>         route.adviceWith(context, new RouteBuilder() {
>         public void configure() throws Exception {
>         interceptSendToEndpoint("*jms:*"*)
>         .skipSendToOriginalEndpoint()
>         ..............
>         ..............
>         }
> });
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Using-advicewith-to-add-interceptors-to-an-existing-route-tp5715363.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



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