All,
I am fairly new to ServiceMix and with that I am just testing the basic Camel examples to move files from one directory to another. The first one I did with Spring and ensured it was in the ActiveMQ activemq-broker.xml and it starts and works as advertised. Then I disable it and try to Java example. The second one in java appears to deploy fine and shows up in the bundles list and is active in servicemix, but does not start to do its work. ####### Spring XML Example (Works) ################ <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"> <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"> <packageScan> <package>org.foo.bar</package> </packageScan> <route id="fileinout"> <description>Example Camel Route</description> <from uri="file://c:/temp/indir/"/> <to uri="file://c:/temp/outdir/"/> </route> </camelContext> </beans> ######## Java DSL Example (Does not start) ############ First, I deploy the JAR to this directory: C:\Apache\apache-servicemix-4.4.2\deploy. Yes, camel-core OSGI is installed and started. import org.apache.camel.CamelContext; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.impl.DefaultCamelContext; public class CamelDSLFileIO { public static void main(String args[]) throws Exception { RouteBuilder builder = new RouteBuilder() { public void configure() { from("file://c:/temp/indir/?noop=false&delay=2000").to("file://C:/temp/o utdir/"); } }; CamelContext context = new DefaultCamelContext(); context.addRoutes(builder); context.start(); } } #################################################### What am I missing? Justin
