You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Jim Talbut <jt...@spudsoft.co.uk> on 2011/02/22 07:29:54 UTC

Attaching a to a

Hi,

Is there any way to attach a route (from one spring XML file) to a 
camelContext (defined in another at an earlier time)?
I'm thinking, for example, of an OSGi situation where I want to add a 
route to a predefined context without writing code.
Is there any fundamental reason why there couldn't be a way to do it, 
like an optional camelContext attribute on the <route> element?

I could define multiple camelContexts, but then I don't think that the 
camel-web component would work with them.

Thanks

Jim

Re: Attaching a to a

Posted by Claus Ibsen <cl...@gmail.com>.
No you would have to write code.

On CamelContext there is a method to load routes from XML file, which
you can use to add routes to an existing CamelContext.

See this example
http://camel.apache.org/loading-routes-from-xml-files.html


On Tue, Feb 22, 2011 at 7:29 AM, Jim Talbut <jt...@spudsoft.co.uk> wrote:
> Hi,
>
> Is there any way to attach a route (from one spring XML file) to a
> camelContext (defined in another at an earlier time)?
> I'm thinking, for example, of an OSGi situation where I want to add a route
> to a predefined context without writing code.
> Is there any fundamental reason why there couldn't be a way to do it, like
> an optional camelContext attribute on the <route> element?
>
> I could define multiple camelContexts, but then I don't think that the
> camel-web component would work with them.
>
> Thanks
>
> Jim
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/