I just assume the context means Camel Context, am I right?
If you create the Camel Context you need to manage it yourself. I don’t think 
it is possible to look up the other Camel Context from the route which only 
knows about the CamelContext holds it.
There are some components can only be used to talk each other within the same 
CamelContext, such as seda, direct. And we use these component to glue the 
routes. 

So my suggestion is you keep the dynamic routes in the same CamelContext, 
unless you don’t want them talk to each other. 

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On April 15, 2015 at 9:38:42 PM, Gustav Sinder (gustav.sin...@ferrologic.se) 
wrote:
> Hi,
>  
> I'm working on a solution where I dynamically setup/remove routes based on 
> external  
> configuration. So far so good, it works good, a manager route handles this 
> just good.  
> A thought would be to place the dynamic routes in another context. I can 
> create new contexts  
> from within the Java without problem but I can't seem to find a way to either 
> list the active  
> contexts and/or get a context by its name.
>  
> Also, are there any drawbacks on using another CamelContext instead of 
> placing it all  
> in the same one where the "manager route" also runs?
>  
> Thanks
> /Gustav
>  
>  
>  

Reply via email to