views:

35

answers:

1

I have a simple Route written in Java and have the jar file deployed to activemq/lib and updated the activeMQ.xml to look for the route via the package can element.

But the route is not showing up in the web admin console... wondering what other steps are involved...

public class SampleConnectorRoute extends RouteBuilder { 
public void configure() {
 from("file://c:/app/mdt/dropbox/new").to("file://c:/app/mdt/dropbox/processed");
}

public static void main(String[] args) throws Exception {
 SampleConnectorRoute builder = new SampleConnectorRoute();
    builder.runSampleConnectorRoute();
}

public void runSampleConnectorRoute() throws Exception {
    // create CamelContext
 CamelContext camelContext = new DefaultCamelContext();
    camelContext.addRoutes(this);
    camelContext.start();

    System.out.println("Context Started");
}

}

then i have the following config under activemq/conf/activemq.xml http://activemq.apache.org/camel/schema/spring"> com.apps.mdt.routes

A: 

How are you starting your activemq instance? For custom camel configurations I typically make my own configuration file and start it using:

activemq xbean:myconfigfile.xml

Perhaps you can post your route xml for debugging purposes.

EDIT:

In your activemq.xml you need to uncomment the <import resource="camel.xml"/> tag.

In your camel.xml file you need to add your package under the package scan tag.

<!-- You can use a <packages> element for each root package to search for Java routes -->
<packageScan>
   <package>org.foo.bar</package>
</packageScan>
gwhitake
yep i'ev already done that... The route is still not showing up in the web console...
esimran