I'm using the standard bin/activemq.bat script to start it all up.

I have been popping around between versions 4.1.1 and 5 a bit, but the
comments are checked against version 5.

The only possible explanation I have so far is that I compiled my custom
RouteBuilder against a version of Camel that didn't quite match that which
is included in 5 (I suppose this could lead to it being filtered out of the
dynamic loading).  This is possible since I've been juggling camel 1.0,
camel 1.1, amq 4.1.1 and amq 5.0 source trees and may not have been as
methodical as I should have.  However, this occurred to me some time ago and
I have extracted my source configurations more than once to ensure this
wasn't the case.  This also doesn't explain the wacky enumeration over URLs
that I saw in ResolverUtil.

Is anything known about the CompoundEnumeration class (it's a sun.misc class
and there doesn't seem to be any source available for it).  As far as I can
tell, its just an enumeration with no fancy filtering features but perhaps
that's not true...

-Dominic


James.Strachan wrote:
> 
> On 8/14/07, DominicTulley <[EMAIL PROTECTED]> wrote:
>> This is a bit bizarre now...
>>
>> I duplicated your experiment with the examples jar and sure enough it all
>> worked.
>>
>> So, I looked at my jar and the only significant difference I could see
>> was
>> that I didn't have a META-INF/spring/camel-context.xml in it.  So, I put
>> one
>> in (copied from the example that worked) and it started working.
>>
>> So,  do I need to have camel-context.xml in the jar (and if so, does it
>> have
>> to be in a spring subdirectory of META-INF)?
> 
> Definitely not. Basically all the discover-by-package code does is use
> the classloaders to get the Package and iterate through them looking
> for RouteBuilder.
> 
> The only use of a META-INF/spring/camel-context.xml is if you're using
> Spring-OSGi - or you're using the camel:run maven plugin...
> http://activemq.apache.org/camel/camel-maven-plugin.html
> 
> 
> 
>> Now, the really bizarre bit is that I took the camel-context.xml out
>> again
>> (to prove it really was the thing that mattered) and it still worked!
>>
>> So, I now have a jar which contains a RouteBuilder and the RouteBuilder
>> is
>> loaded and configured as it should be.  I just don't understand why.
>> Perhaps ActiveMQ is caching something that's letting it work
>> subsequently..
>>
>> I'd really like to get to the bottom of this - mainly so that this
>> discussion thread can contain the solution for anyone else that
>> encounters
>> it..
> 
> Whoah thats really bizarre!
> 
> I'm at a bit of a loss to understand this. Just to double check I
> understand whats going on - you're just using a binary ActiveMQ 5.x
> distro - and popping your jar in activemq/lib and having this grief
> right? And you're running ActiveMQ using bin/activemq? (or java -jar
> run.jar).
> 
> Both are the same - and run this class...
> https://svn.apache.org/repos/asf/activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/Main.java
> 
> which doesn't seem to have any kinda wacky code in it that I can see -
> it just basically adds the URLs of all the files it finds to the
> ClassLoader.
> 
> I wonder if rather than using the bin/activemq or run.jar, using some
> kinda shell script to set the classpath works?
> -- 
> James
> -------
> http://macstrac.blogspot.com/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/CAMEL-and-ActiveMQ5---Integration-tf4140859s22882.html#a12145052
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to