camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "alberto.zigoni" <>
Subject Re: Multiple contexts startup order with Spring
Date Fri, 08 Jul 2011 11:19:02 GMT
Using "depends-on" on the camelContext does the trick, but it couples the
contexts. In my case, the first context is used only during development.

Anyway, I have just found a rather rough but working way of doing it.
My Camel contexts are defined in two different XML files under
META-INF/spring, and I have noticed that Spring sorts files before loading
them. Thus, using filenames with patterns such as e.g. 
01-camel-context.xml, 02-camel-context.xml, the contexts are loaded in the
desired order.


Spring is pretty lame in letting end users be in control of the orders.

All you have at your disposal in the XML file is the "depends-on" attribute.
So try using that to see if you can control the ordering a bit better.

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

View raw message