You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by dbremmen <db...@gmail.com> on 2014/10/02 17:21:20 UTC

how to have multiple camel contexts with java config

Dear Camel Experts,

I'm trying to group several camel routes in different camel contexts to
avoid component name clashing. I know how to configure several RouteBuilder
classes in the same Context extending From CamelConfiguration this way

   @Configuration
   public class CamelConfig extends CamelConfiguration {

   @Override
   public List<RouteBuilder> routes() {
       // here I create the RouteBuilder List and the return it
   }

But how I can have some routes in one camel context and other routes in
other camel context using Java Configuration?

Basically I have a property file where I define a list of the RouteBuilder
classes. And then the code in routes() iterate that file. What I'd like to
have is the same file with the list of RouterBuilder classes but create each
RouteBuilder inside its own Camel Context.
I have the configuration file to activate or deactivate RouteBuilder's 

Thanks in Advance,
  Best Regards
   David



--
View this message in context: http://camel.465427.n5.nabble.com/how-to-have-multiple-camel-contexts-with-java-config-tp5757320.html
Sent from the Camel - Users mailing list archive at Nabble.com.