activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Albert Strasheim" <full...@gmail.com>
Subject ActiveMQ as a Windows Service
Date Mon, 18 Sep 2006 15:31:20 GMT
Hello all

I've set up ActiveMQ to run as a Windows Service using Java Service Wrapper.
I thought I'd share the wrapper configuration here to make it easier for
others that want to do the same.

You can find out more about Java Service Wrapper here:

http://wrapper.tanukisoftware.org/doc/english/introduction.html

It can run Java applications as Windows Services and UNIX daemons (I haven't
tried the latter yet).

I followed Method 1 on the Integration Methods page:

http://wrapper.tanukisoftware.org/doc/english/integrate.html
http://wrapper.tanukisoftware.org/doc/english/integrate-simple-win.html
http://wrapper.tanukisoftware.org/doc/english/integrate-simple-nix.html

Follow these instructions to put the bits of JSW in the right places in the
ActiveMQ tree.

Put the stuff at the end of this message in ./conf/wrapper.conf in your
ActiveMQ tree (watch out for line breaks). Note that we only put run.jar and
wrapper.jar in the classpath. ActiveMQ's org.apache.activemq.console.Main
class has a addExtensionDirectory method that takes care of the rest.

That's it. Use the JSW batch files to register your service.

Cheers,

Albert

P.S. I'd like to put this on the wiki, but I ran into the following error
from Confluence:

This installation of Confluence is not licensed to add any more users.
Please contact the site administrators for more information.

---# start of wrapper.conf for ActiveMQ #---

#********************************************************************
# Apache ActiveMQ Wrapper Properties
#********************************************************************
# Java Application
wrapper.java.command=C:\Program Files\Java\jdk1.5.0_07\bin\java.exe

# Java Main class.  This class must implement the WrapperListener interface
#  or guarantee that the WrapperManager class is initialized.  Helper
#  classes are provided to do this for you.  See the Integration section
#  of the documentation for details.
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp

# Java Classpath (include wrapper.jar)  Add class path elements as
#  needed starting from 1
wrapper.java.classpath.1=run.jar
wrapper.java.classpath.2=../lib/wrapper.jar

# Java Library Path (location of Wrapper.DLL or libwrapper.so)
wrapper.java.library.path.1=../lib

# Java Additional Parameters
wrapper.java.additional.1=-Dactivemq.home="C:\Program Files\Apache Software
Foundation\incubator-activemq-4.0.1"
wrapper.java.additional.2=-Dorg.apache.activemq.UseDedicatedTaskRunner=true
wrapper.java.additional.3=-Dderby.system.home="..\data"
wrapper.java.additional.4=-Dderby.storage.fileSyncTransactionLog=true
wrapper.java.additional.5=-Dcom.sun.management.jmxremote

# Initial Java Heap Size (in MB)
wrapper.java.initmemory=64

# Maximum Java Heap Size (in MB)
wrapper.java.maxmemory=512

# Application parameters.  Add parameters as needed starting from 1
wrapper.app.parameter.1=org.apache.activemq.console.Main
wrapper.app.parameter.2=start
wrapper.app.parameter.3=xbean:activemq.xml

#********************************************************************
# Wrapper Logging Properties
#********************************************************************
# Format of output for the console.  (See docs for formats)
wrapper.console.format=PM

# Log Level for console output.  (See docs for log levels)
wrapper.console.loglevel=INFO

# Log file to use for wrapper output logging.
wrapper.logfile=../var/wrapper.log

# Format of output for the log file.  (See docs for formats)
wrapper.logfile.format=LPTM

# Log Level for log file output.  (See docs for log levels)
wrapper.logfile.loglevel=INFO

# Maximum size that the log file will be allowed to grow to before
#  the log is rolled. Size is specified in bytes.  The default value
#  of 0, disables log rolling.  May abbreviate with the 'k' (kb) or
#  'm' (mb) suffix.  For example: 10m = 10 megabytes.
wrapper.logfile.maxsize=0

# Maximum number of rolled log files which will be allowed before old
#  files are deleted.  The default value of 0 implies no limit.
wrapper.logfile.maxfiles=0

# Log Level for sys/event log output.  (See docs for log levels)
wrapper.syslog.loglevel=NONE

#********************************************************************
# Wrapper Windows Properties
#********************************************************************
# Title to use when running as a console
wrapper.console.title=Apache ActiveMQ

#********************************************************************
# Wrapper Windows NT/2000/XP Service Properties
#********************************************************************
# WARNING - Do not modify any of these properties when an application
#  using this configuration file has been installed as a service.
#  Please uninstall the service before modifying this section.  The
#  service can then be reinstalled.

# Name of the service
wrapper.ntservice.name=Apache ActiveMQ

# Display name of the service
wrapper.ntservice.displayname=Apache ActiveMQ

# Description of the service
wrapper.ntservice.description=Apache ActiveMQ is a fast open source JMS 1.1
Message Fabric which supports clustering, peer networks, discovery, TCP,
SSL, multicast, persistence, XA and integrates seamlessly into J2EE 1.4
containers, light weight containers and any Java Virtual Machine together
with having a host of Cross Language Clients.

# Service dependencies.  Add dependencies as needed starting from 1
wrapper.ntservice.dependency.1=

# Mode in which the service is installed.  AUTO_START or DEMAND_START
wrapper.ntservice.starttype=AUTO_START

# Allow the service to interact with the desktop.
wrapper.ntservice.interactive=false


Mime
View raw message