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...@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. >