Hi users,

I've written some classes (message-transformers for camel-routing) which
should be used inside ActiveMQ. Actually at the moment I put them into the
%ACTIVEMQ_HOME%\libs-folder and it works. In real-world deployment I want
to separate the custom libraries from the ActiveMQ-own libraries while
putting my own classes in another folder.

After reading some documentation, it should work with the
activemq.home-system-property. But my own classes are not found if I change
the %ACTIVEMQ_CLASSPATH%-variable in activemq.bat from

set
ACTIVEMQ_CLASSPATH=%ACTIVEMQ_BASE%/conf;%ACTIVEMQ_HOME%/conf;%ACTIVEMQ_CLASSPATH%
to
set
ACTIVEMQ_CLASSPATH=%ACTIVEMQ_BASE%/conf;%ACTIVEMQ_HOME%/conf;%ACTIVEMQ_HOME%/customlibs;%ACTIVEMQ_CLASSPATH%

As a workaround I use java.ext.dirs-property this way:

set ACTIVEMQ_CUSTOM_LIBRARIES = %ACTIVEMQ_HOME%/customlibs
and then add a property to the calling java-command in activemq.bat:
-Djava.ext.dirs="%ACTIVEMQ_CUSTOM_LIBRARIES%"
And now while starting up the broker, my custom libraries are picked up
from the customlibs-folder.

This works, no questions, but it would be nicer if somebody could explain
me, how to use the way with the activemq.classpath-property.

best,
christoph

OS:    Win2k8 R2
AMQ: 5.5.1
JVM:  1.6.0_26

Reply via email to