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: Interceptor / stop / xml configuration file
Date Tue, 17 Feb 2009 11:35:14 GMT
Hi

You should only use the intercept tag, and then route to whatever you want to do


> <route>
>        <from uri="direct:a" />
>        <intercept>
>                <processRef ref="validateInterceptor"/>
>                <to uri="mock:test"/>
>                <stop/>
>        </intercept>
>        <to uri="direct:b"/>
> </route>

But you can also route to a POJO and do what you like so you dont have
to implement any Camel interfaces.
>        <intercept>
>                <beanRef ref="someSpringBean"/>
>                <to uri="mock:test"/>
>                <stop/>
>        </intercept>





On Tue, Feb 17, 2009 at 11:59 AM, mta38 <mtaraud.ext@orange-ftgroup.com> wrote:
>
> Hi all,
> I want to use interceptor in my route. But I think I may do something wrong
> Here is my code
> <route>
>        <from uri="direct:a" />
>        <intercept>
>        <interceptor id="intercept1" ref="validateInterceptor"/>
>                <to uri="mock:test"/>
>                <stop/>
>        </intercept>
>        <to uri="direct:b"/>
> </route>
>
> … other routes …
>
> <bean id="validateInterceptor"
> class="com.example.interceptors.CheckMessageValidation"/>
>
> My class CheckMessageValidation extends DelegateProcessor. The process
> method only adds a trace in a log file.
>
> When I test this route, I state that I have the expected trace in my log
> file, but all other routes are executed. The System does not stop after
> sending exchange to Mock endpoint.
> Can anybody can explain me what is wrong in my route.
> Best regards,
> Mta38
>
>
> --
> View this message in context: http://www.nabble.com/Interceptor---stop---xml-configuration-file-tp22054882s22882p22054882.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/

Mime
View raw message