On Wed, Oct 17, 2012 at 5:59 PM, Robert <[email protected]> wrote: > Hi, > > I am wondering why use of RouteBuilder is not allowed in a RouteContext when > using XML. I am using Camel 2.10.1. Could this be a defect in the schema or > is there some other reason? Many thanks for Camel BTW. > > For example: while I can use a RouteBuilder like this: > > <bean id="fooRouteBuilder" class="local.com.foo.FooRouteBuilder"/> > > <camel:camelContext> > <camel:routeBuilder ref="fooRouteBuilder"/> > </camel:camelContext> > > the following XML does not validate against the camel XML schema (and > subsequently the context initialization fails): > > <bean id="fooRouteBuilder" class="local.com.foo.FooRouteBuilder"/> > > <camel:routeContext id="fooRouteContext"> > <camel:routeBuilder ref="fooRouteBuilder"/> > </camel:routeContext> >
Just to be sure its the above snippet that doesn't validate, eg routeContext with an embedded <routeBuilder> ? Its a bit unusual combination, as you can from <camelContext> just refer to the routeBuilder directly. The <routeContext> was intended for splitting up XML DSL into multiple files. And not as much for Java DSL. > <camel:camelContext> > <camel:routeContextRef ref="fooRouteContext"/> > </camel:camelContext> > > Thanks, > Robert > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/RouteBuilder-not-allowed-in-RouteContext-why-tp5721184.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. FuseSource is now part of Red Hat Email: [email protected] Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
