The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

bobs99 (5) [Avatar] Offline

Excellent book, really enjoying it.

Having downloaded the environment and successfully run several of the book's examples, I'm now experiementing with Mule and ActiveMQ outside of the Eclipse environment, in standalone mode.

From the command line I am now trying to configure a Mule endpoint talking to an already running instance of ActiveMQ on port 61616 of my localhost.

When I define the JMS broker as per the examples in the book, like this:

<jms:activemq-connector name="example" brokerURL="tcp://localhost:61616"/>

I get ClassNotFoundExceptions, until I make the ActiveMQ jars available to Mule, via the MULE_LIB environment variable, then it seems fine - no errors. But when I then try and configure the Mule JMS endpoints in the Mule config file, using:

<jms:outbound-endpoint queue="log.queue" />
<jms:inbound-endpoint queue="log.queue" />

I get ActiveMQConnectionFactory, ClassNotFoundException errors from Mule even though the jar containing this class is made available to Mule via the MULE_LIB variable.

1. Is this totally the wrong approach to get a standalone Mule talking to a standalone ActiveMQ?

2. Is MULE_LIB the wrong way to make ActiveMQ's jar files available to Mule?

3. Any comments or examples to help achieve this standalone Mule to standalone ActiveMQ connection would be much appreciated.

Many thanks.
tijs.rademakers (494) [Avatar] Offline
Re: Mule and External ActiveMQ

Great, thanks!
The best way, from my experience, to make jars available on the Mule classpath is to copy them to the lib/user directory in your Mule distribution. This is quite similar to what we do with our examples. So to answer your questions:

1. No, this is the right way
2. Yes, you should copy the libraries to the lib/user directory
3. I think you will get this working quite easily if you copy the ActiveMQ libraries to the lib/user directory

Best regards,