camel-users mailing list archives

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

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>
</beans>

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();

main.setApplicationContextUri("config/main.xml");
main.enableHangupSupport();
main.run();

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?

thanks

james



--
View this message in context: http://camel.465427.n5.nabble.com/Why-I-cannot-run-multiple-CamelContext-simultaneously-tp5727877.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message