Re: Add routes to existing Camel context using Spring

2013-06-04 Thread ikoblik
This simple static function solves the issue for me: public static CamelContext addRoute(CamelContext camelContext, RouteBuilder routeBuilder) throws Exception { Preconditions.checkNotNull(camelContext, Utils.NPE_TEMPLATE, "Camel context"); Preconditions.checkNotNull(routeBuilder,

Re: Add routes to existing Camel context using Spring

2013-06-04 Thread ikoblik
Hello Claus, Thank you for quick replies! Linked example looks interesting but I'd have to fall back to Java which is a pity if you try to stick to XML for configuration. Maybe I can come up with a pseudo bean that would add routes to the existing context? I'll post here if I decide to go this wa

Re: Add routes to existing Camel context using Spring

2013-06-04 Thread Claus Ibsen
Hi See this cookbook example http://camel.apache.org/loading-routes-from-xml-files.html On Tue, Jun 4, 2013 at 3:20 PM, ikoblik wrote: > Hi All, > > Is it possible to add routes to existing spring context? All examples [1] > show how to declare routes and then create Camel Context with them, I c