Re: RouteBuilder not allowed in RouteContext - why?
Claus Ibsen-2 wrote We may be able to do something about this. Feel free to log a JIRA for an improvement. Done. Thanks. https://issues.apache.org/jira/browse/CAMEL-5717. Regards, Robert -- View this message in context: http://camel.465427.n5.nabble.com/RouteBuilder-not-allowed-in-RouteContext-why-tp5721184p5721312.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: RouteBuilder not allowed in RouteContext - why?
Hi, On Thu, Oct 18, 2012 at 6:15 AM, Claus Ibsen-2 [via Camel] ml-node+s465427n5721208...@n5.nabble.com wrote: On Wed, Oct 17, 2012 at 5:59 PM, Robert [hidden email] wrote: I am wondering why use of RouteBuilder is not allowed in a RouteContext when using XML.[..] 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 ? Yes. routeBuilder embedded in a routeContext does not validate. 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. Thanks for pointing this out. Just for your information: Splitting the XML in multiple files is exactly our use case. We want our users be able to edit some of the routes like configuration files. However, some of these routes are rather complex. We want to hide this complexity from our users using routebuilders, which just take the user-relevant parameters and take care of the rest route configuration. Guess we will work around this by declaring in each XML file a routeContext and let the routes communicate with the vm: component. Thanks in any case. Without Camel we would have had to reinvent the wheel painfully! Best regards, Robert -- View this message in context: http://camel.465427.n5.nabble.com/RouteBuilder-not-allowed-in-RouteContext-why-tp5721184p5721231.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: RouteBuilder not allowed in RouteContext - why?
On Wed, Oct 17, 2012 at 5:59 PM, Robert robert.stepa...@gmail.com 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: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen