On 8/14/07, DominicTulley <[EMAIL PROTECTED]> wrote: > This is also the problem I am now facing (I started another thread on it, but > this one is also good). > > I have debugged through the point where the loading appears to occur > (org.apache.camel.util.ResolverUtil) and the class loader is not returning a > URL to the jarfile that contains my builder (in fact the call to the class > loader returns an empty Enumeration of URLs irrespective of what package > name is provided - and the package name IS being passed incorrectly to this > method). For instance, even if I provide a package of "org", the > classloader returns an empty enumeration. This suggests to me there is an > issue with the state of the classpath at the point when this is running (no > doubt ActiveMQ and Spring do their own terribly clever things during this). > > If I run a simple test case of the code (copy and paste bits of the code and > run it in eclipse) then it works just fine. It's definitely something to do > with when it's running within ActiveMQ. > > I'm wondering if dynamic loading of RouteBuilders has ever been observed to > work in ActiveMQ (do I stand a chance of making it work?) or is this a > significant issue that will need investigating and resolving?
It should work! :) So I just did a test to check this really does work. Here's what I did. * copied the camel-example-spring.jar into the activemq/lib directory (in the binary distro of 5.x). * editied the conf/activemq.xml to look like this... <camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring"> <package>org.apache.camel.example</package> </camelContext> Then I started ActiveMQ and it just worked (I saw the queue "test.MyQueue" in the web console - then when I sent a message via the web console the camel processing log message appeared in the console). I wonder - if the change you hit is the change from the "packages" attribute in camel 1.0 to the 0-many <package> elements in Camel 1.1? I've just added a little warning to the 1.1 download page in case thats it... http://cwiki.apache.org/CAMEL/camel-110-release.html also I've patched the activemq.xml in trunk with comments to show the new syntax etc. -- James ------- http://macstrac.blogspot.com/