Aha :-) I tested in Spring and it works. 

I think the service approach actually is what I'm looking for, since the
import seems to "run" the xml-file again, which means if I include it in
many files, camel will try to define the routes in the included files as
many times as it's included.

Where should I look to find information about export and import
camel-context as a service?

I very much appreciate your help. I've spend almost a day on trying to
figure this out :-)

<?xml version="1.0" encoding="UTF-8"?>
<beans
   xmlns="http://www.springframework.org/schema/beans";
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   xsi:schemaLocation="
        http://camel.apache.org/schema/spring
        http://camel.apache.org/schema/spring/camel-spring.xsd
        http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd";>

         <import
resource="file:///home/idempiere/AppServers/karaf/deploy/blackbox.xml"/>

 <camelContext id="whitebox" xmlns="http://camel.apache.org/schema/spring";
depends-on="blackbox">

        <route id="TestWhiteBox">
                <from uri="context:blackbox:testBlackBox"/>
                <log message="Called black box from white box"/>
        </route>

 </camelContext>
</beans>




--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-context-only-seems-to-work-within-the-same-file-or-do-I-use-it-wrong-tp5738442p5738480.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to