camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DOLECEK Ales <>
Subject RE: Why I cannot run multiple CamelContext simultaneously?
Date Wed, 20 Feb 2013 17:17:44 GMT
Should work. Did you EXPLICITLY specified context IDs?
If you have more than one context you can't rely on the default since all context would get
same - and that is not possible.


-----Original Message-----
From: james.z.zhou [] 
Sent: Wednesday, February 20, 2013 4:20 PM
Subject: Why I cannot run multiple CamelContext simultaneously?


The story is, I have two camelContexts defined in two XML files, say camel-context1.xml and
camel-context2.xml and I imported them to a main.xml, the main.xml looks like:

<import spring-DB.xml>
<import spring-PROCESSOR.xml>
<import spring-camel-context1.xml>
<import spring-camel-context2.xml>

DB.xml contains DB-related bean definitions, like jpaComponent and PROCESSOR.xml contains
the processor bean definitions.

In the Main class, I newed a Camel.Spring.Main instance:

Main main = new Main();


In the log file, I can see all the xml files imported in main.xml are loaded successfully.
However, only the camelContext in camel-context1 starts working, the camelContext in camel-context2
is not working. If I move <import spring-camel-context2.xml> above <import spring-camel-context1.xml>,
then the camelContext in camel-context2 starts working, the camelContext in
camel-context1 is not working.

BTW, I am using the jar version: 2.10.0

Do you guys have any idea please?



View this message in context:
Sent from the Camel - Users mailing list archive at
View raw message