Return-Path: Delivered-To: apmail-geronimo-activemq-users-archive@www.apache.org Received: (qmail 73824 invoked from network); 18 Sep 2006 15:32:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Sep 2006 15:32:51 -0000 Received: (qmail 17532 invoked by uid 500); 18 Sep 2006 15:32:50 -0000 Delivered-To: apmail-geronimo-activemq-users-archive@geronimo.apache.org Received: (qmail 17512 invoked by uid 500); 18 Sep 2006 15:32:50 -0000 Mailing-List: contact activemq-users-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-users@geronimo.apache.org Delivered-To: mailing list activemq-users@geronimo.apache.org Received: (qmail 17500 invoked by uid 99); 18 Sep 2006 15:32:49 -0000 X-ASF-Spam-Status: No, hits=1.9 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: 146.232.64.14 is neither permitted nor denied by domain of fullung@gmail.com) Received: from [146.232.64.14] (HELO mail2.sun.ac.za) (146.232.64.14) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Sep 2006 08:32:41 -0700 Received: from asok.dsp.sun.ac.za ([146.232.222.14] helo=asok) by mail2.sun.ac.za with esmtp (Exim 4.50) id 1GPL5Z-0007Sh-Vy for activemq-users@geronimo.apache.org; Mon, 18 Sep 2006 17:31:18 +0200 From: "Albert Strasheim" To: Subject: ActiveMQ as a Windows Service Date: Mon, 18 Sep 2006 17:31:20 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2757 Thread-Index: AcbbN31cZ23kHxmQS12lpeVNLrCWRw== Message-ID: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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