activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Schöchlin <>
Subject Improved ActiveMQ Initscript
Date Tue, 10 Nov 2009 21:15:32 GMT
Hello ActiveMQ developers,

i wrote a new initscript for running standalone activemq installations
(see attached script).

This script is originally based on the scripts  "activemq" and
"activemq-admin" located in
"assembly/src/release/bin/" and replaces both scripts.

Read "usage-examples.txt" for  getting a first impression of the initscript.

Features of the new script:
- the script should be compatible with cygwin, macosx and most linux and
unix systems
  To ensure compatibility to macosx and cygwin it does not utilize lsb
standard infrastructure for controlling daemons like
   (i tried to keep the shell-syntax compatible to most unix systems,
but only tested on SLES11 and Ubuntu 9.10)
- the complete functionality if "activemq-admin" is now included in
  (list, query, browse, ...)
- all option not implemented by the initscript, are directly passed to
the java-call
- the configuration parameters can be located in
/etc/default/activemq.conf or  $HOME/.activemqrc
- the script supports operation of multiple instances on the same system
  (if the script is symlinked/renamed to
"activemq-instance-<INSTANCENAME>", the configuration
  is searched on /etc/default/activemq-instance-<INSTANCENAME>.conf and
- in case of syntax-errors in the configuration, the execution is stopped
- a template configuration for the script can be created by using the
"setup" option
- activemq configuration- and data-dir (e.g. kahadb, tmpstorage) are
- configuration hints for jmx (because of non-available
"VirtualMachine.attach(PID)", especially needed when using a ibm jvms)
- improved shutdown procedure: script invokes shutdown by a jmx-request,
if process does not disappear
  after a configurable timeout, the process is killed by SIGKILL (-9)
- start activemq daemon as an background process : option "start"
- start activemq daemon without daemonizing the daemon: option "fgstart"
- usage of PID files to determine running activemq instances
- the "status" option, checks if there is a running activemq instance
  (this is useful for using activemq with high-availability tools)
- the script outputs usage-information if it is invoked without any option
  (usage of the java binary combined with the script-usage)

In my opinion it would be good/nice:
- if this script is will be tested on several unix-systems and on cygwin
- to provide the possibility to configure the entire jmx-setup in
activemq.xml or jetty.xml
  (if jetty provides this)
- it would be nice if the java code supports daemonizing
- if this script will be part of activemq, we should adapt the wiki pages

Feedback and improvement ideas are very welcome :-)

Best regards
Marc Schoechlin

View raw message