Return-Path: Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 17457 invoked from network); 28 Jul 2000 15:52:38 -0000 Received: from web1004.mail.yahoo.com (128.11.23.94) by locus.apache.org with SMTP; 28 Jul 2000 15:52:38 -0000 Received: (qmail 12131 invoked by uid 60001); 28 Jul 2000 15:52:37 -0000 Message-ID: <20000728155237.12130.qmail@web1004.mail.yahoo.com> Received: from [204.254.32.135] by web1004.mail.yahoo.com; Fri, 28 Jul 2000 08:52:37 PDT Date: Fri, 28 Jul 2000 08:52:37 -0700 (PDT) From: "David M. Holmes" Subject: RE: Tomcat running on NT4 server To: tomcat-user@jakarta.apache.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N Use the jk_nt_service.exe to setup Tomcat to run as service... --- Jaime Vasquez wrote: > Gal Shachor from IBM help me out on this one a couple of months ago here is > the stuff he provided > > Jaime Vasquez > jaime@binartek.com > (781) 238 - 6144 ext. 14 > www.binartek.com > > > -----Original Message----- > From: Luiz Guilherme Freitas de Paula [mailto:moonsite@gold.com.br] > Sent: Friday, July 28, 2000 9:34 AM > To: tomcat-user@jakarta.apache.org > Subject: Tomcat running on NT4 server > > > Hi, > > How can I start Tomcat in my NT4 server without having to log on and use the > BAT file? > Is there a way to use it like a service? > > Thanks, > > Luiz Guilherme > > > ATTACHMENT part 2 application/octet-stream name=jk_nt_service.exe
Working with the Jakarta NT Service

Working with the Jakarta NT Service

By Gal Shachor <shachor@il.ibm.com>

The Jakarta NT service is an executable that wraps the Tomcat servlet container and executes it in the background as an NT service. To install it you will need to:

  1. Get a hold on the NT executable (jk_nt_service.exe)
  2. Customize a properties file that provides the service with Tomcat information (wrapper.properties).
  3. Install jk_nt_service by running it with the -i flag.
    • Execute jk_nt_service -I <name of service> <path to updated wrapper properties>
    • <name of service> should be a single word (without and spaces) such as Jakarta
    • <path to updated wrapper properties> should point to your wrapper.properties file (and the service will check it's existence.)
    • For example, a valid command line can be jk_nt_service -I Jakarta wrapper.properties
  4. Start tomcat as a service.
    • From the command line, execute net start <name of service> (e.g. net start Jakarta)
    • From the NT services applet, highlight your service and press start.
  5. Stop Tomcat as a service.
    • From the command line, execute net stop <name of service> (e.g. net stop Jakarta)
    • From the NT services applet, highlight your service and press stop.

Special note: The Tomcat service is using AJPV12 to perform clean shutdown and you should make sure that an AJPV12 connector is defined in your server.xml. In the absence of a configured AJPV12 port the Tomcat service will kill Tomcat abruptly (that is murder it) without giving it a chance to clean up.

Advance Setup

  1. Modify the Tomcat NT service properties. By default the service will run in manual mode and under the local system user account. To modify this, open the NT services applet, highlight your service and press startup. A popup window is opened and you will be able to customize the service to your satisfaction.
  2. Modify the classpath. The classpath is determined by the wrapper.class_path properties, to modify it just add/remove/modify wrapper.class_path lines. The complete classpath is calculated by concatenating all the wrapper.class_path lines and putting ";" between them.
  3. Execute several Tomcat instances. Say that you want one Tomcat to run for "production" and one for development, you can do that. All you will need to do is to install the Tomcat service twice and under two different names (and with different wrapper.properties file and server.xml files).
    • Make sure that the AJPV12 and HTTP connectors are modified in each server.xml file to prevent a clash.
    • Make sure to update the wrapper.shutdown_port property in wrapper.properties to point to the correct AJPV12 shutdown ports (default is 8007).
  4. Modify the command line used to start Tomcat. The Tomcat service is taking all it's command line configuration from wrapper.properties! To customize the command line, edit the property wrapper.cmd_line and make sure that it makes a legal Java command line.

Feedback

Please send feedback, bug report or any additional information to <tomcat-user@jakarta.apache.org>

__________________________________________________ Do You Yahoo!? Kick off your party with Yahoo! Invites. http://invites.yahoo.com/