Have you tried disabling error handling on context2?
> On Oct 25, 2016, at 12:37 PM, Santhosh <[email protected]> wrote: > > I have multiple context, and I use direct-vm to call route in another > context. If there any exception, direct-vm is not passing that exception > correctly to the parent/source route. If I use nmr, then source route gets > the exception and onException is getting called correctly. > > Here in this example > > <camelContext id="context1" trace="true" > xmlns="http://camel.apache.org/schema/spring"> > > <onException> > <exception>java.lang.Throwable</exception> > <handled> > <camel:constant>true</camel:constant> > </handled> > <to uri="bean:exceptionProcessor" /> > </onException> > > > <route id="context1route"> > <from uri="cxfrs:bean:serviceEndpoint"/> > <to uri="direct-vm:route2"/> > </route> > </camelContext > > > <camelContext id="context2" trace="true" > xmlns="http://camel.apache.org/schema/spring"> > > > <route id="context1route"> > <from uri="direct-vm:route2"/> > <to uri="bean:someProcessor"/> > </route> > </camelContext > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/OnException-across-camelcontext-not-called-when-using-direct-vm-tp5789237.html > Sent from the Camel - Users mailing list archive at Nabble.com.
