Hi Thorsten,

Thanks for your help. Is it possible to use wildcards in ACTIVEMQ_CLASSPATH
? If not, this would be definitely an improvement.
Meanwhile I got my scenario running by using the tanuki wrapper. I didn't
recognize before, that the wrapper-specific activemq.bat is not the same as
the "normal" activemq.bat and all the path-stuff is managed via
wrapper.conf. For those who might need something similiar to my
requirements, here are the important parts of my wrapper.conf:

# Java Classpath (include wrapper.jar)  Add class path elements as
#  needed starting from 1
wrapper.java.classpath.1=%ACTIVEMQ_HOME%/bin/wrapper.jar
wrapper.java.classpath.2=%ACTIVEMQ_HOME%/bin/run.jar
wrapper.java.classpath.3=%MY_OWN_LIBRARY_LOCATION_1%/*
wrapper.java.classpath.4=%MY_OWN_LIBRARY_LOCATION_2%/*
wrapper.java.classpath.5=%MY_OWN_LIBRARY_LOCATION_3%/*
wrapper.java.classpath.6=%ACTIVEMQ_HOME%/lib/*
wrapper.java.classpath.7=%ACTIVEMQ_HOME%/lib/web/*
wrapper.java.classpath.8=%ACTIVEMQ_HOME%/lib/optional/*

note the numbering ;-)

best,
christoph




2012/1/30 Torsten Mielke <tors...@fusesource.com>

> Hello Christoph,
>
> ACTIVEMQ_CLASSPATH is by default only set to include the conf/ directory.
> E.g. if you start a default AMQ instance and connect to it using jconsole
> and click on the VM Summary tab, then you can see this parameter being
> passed into the JVM as follows
>
> -Dactivemq.classpath=/opt/FUSE/AMQ/apache-activemq-5.5.1-fuse-01-13/conf;
>
> Looking at Main.java of activemq-console, subproject, it seems to be
> possible to add additional classpath entries to activemq.classpath, as this
> code section suggests:
>
> // Add any custom classpath specified from the system property
> // activemq.classpath
> app.addClassPathList(System.getProperty("activemq.classpath"));
>
>
> Assuming you have packaged your custom classes into a jar file, you need
> to add the full jar file to the classpath, i.e.
> %ACTIVEMQ_HOME%/customlibs/<file>.jar
>
> and not just the folder containing the jar file.
>
>
> The easiest option for you is probably to place you custom classes in form
> of a jar file into the AMQ_HOME/lib/optional folder. That way these classes
> will be found at runtime.
>
> Hope this helps.
>
>
>
> Torsten Mielke
> tors...@fusesource.com
> tmie...@blogspot.com
>
>

Reply via email to