You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Peng Annie <IM...@kone.com> on 2003/01/27 15:39:22 UTC

John, you are great!

It works!!!!!!!

I am extremely happy!! Thanks a lot!!

Cheers!

Annie

-----Original Message-----
From: Lorenti, John [mailto:JLORENTI@dcjs.state.va.us]
Sent: 27 January 2003 16:00
To: 'Tomcat Users List'
Subject: RE: Strange feature!! Can anyone help?


Annie,

It sounds to me like you need to include the -Xrs flag as a JVM option to
both of these services, but you need to be running at least version 1.3.1 of
the jre/jdk.  In a nutshell, this option tells the JVM to keep running even
when someone logs off (you can check the Java docs at
http://java.sun.com/j2se/1.4.1/docs/tooldocs/windows/java.html for more
information).  Doing this involves editing the registry directly.  Here are
the steps for Tomcat 4.1:

First off, unless you're a registry hacking guru, you may want to make a
copy of your entire registry before making any changes to it.  One way is to
run regedit.exe, choose "Registry/Export Registry File" and set the "Export
range" to "All."  You can name the copy anything you'd like.

1. Run the registry editor of your choice (i.e. regedt32 or regedit).
2. Navigate to HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Apache
Tomcat 4.1.
3. Select the "Parameters" key.
4. Look at the "JVM Option Number" entries to the right and note the highest
value; mine was "JVM Option Number 2" which is what I'll use for the rest of
these steps.  In this case I'm adding a fourth JVM option which will be
called "JVM Option Number 3". If your installation has a different highest
value, just add 1 to it and proceed.
5. Go to Edit/Add Value... on the registry editor's menu.
6. Enter "JVM Option Number 3" (without the double-quotes) for the Value
Name and click OK.
7. Enter "-Xrs" (without the double-quotes) into the String Editor that
comes up and click OK.
8. Double-click the "JVM Option Count" value and add 1 to the number there
(In this case, I changed the 3 to a 4).

You'll need to do something similar for Apache, but since I'm not running
Apache I can't give you the detailed steps :-(

Once your registry edits are done, close the registry editor and restart the
machine.  You should be able to log off and have both of these services
continue to function.

Hope this helps.
-John


-----Original Message-----
From: Peng Annie
[mailto:IMCEAEX-_O=KONE_OU=KCOBE_CN=RECIPIENTS_CN=KCOAPE@kone.com]
Sent: Monday, January 27, 2003 4:02 AM
To: 'tomcat-user@jakarta.apache.org'
Subject: Strange feature!! Can anyone help?


Hi there,

I met a very strange feature of Tomcat and Apache. I have Apache2, Tomcat4,
jk2 on Win2k. I need Apache and tomcat run as NT service. When I installed
Apache and Tomcat, for both of them I chose "Install as NT service". When I
restart the computer without any user logon the NT, the Apache and tomcat
run well as service (I can get my page), but when I "Log off" the NT user
from the server computer, the service can not be found anymore. It means the
service of Apche+Tomcat stops when the NT user is logoff. 

I need the service all the time, either the server computer is restarted or
the NT user is logged off. What should I do with the configuration? Can
anyone help? Many thanks in advance.

BR,

Annie

--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>