camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "james.z.zhou" <>
Subject Why I cannot run multiple CamelContext simultaneously?
Date Wed, 20 Feb 2013 15:20:27 GMT

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