camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Müller <christian.muel...@gmail.com>
Subject Re: Multiple camelContext elements in camel 2.6.0
Date Tue, 28 Feb 2012 10:07:02 GMT
You could code your "onException" strategy in a base route and subclass
this in your other routes...

Best,
Christian

On Tue, Feb 28, 2012 at 8:18 AM, cmland <qiancheng.ch@gmail.com> wrote:

>    There are many spring context xml files in my project ,and i want to use
> "camel:ContextScan" and "camel:include"  to include all the  CamelContext
> into one CamelContext and then i can use one "onException" to process the
> error message. but it was not work.  what i can do for it .
> thanks.
>
> eg:
>        <camel:camelContext id="base" autoStartup="true">
>        <camel:contextScan>
>
>  <camel:includes>classpath*:src/test/resources/com/project/module/*.xml;
>                </camel:includes>
>        </camel:contextScan>
>                <camel:onException useOriginalMessage="true">
>
>  <camel:exception>java.lang.Exception</camel:exception>
>                        <camel:handled>
>                                <camel:constant>true</camel:constant>
>                        </camel:handled>
>                        <camel:bean beanType="com.test.Print"
> method="execute"></camel:bean>
>                </camel:onException>
>        </camel:camelContext>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Multiple-camelContext-elements-in-camel-2-6-0-tp5521056p5521056.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message