tomcat-users mailing list archives

Site index · List index
Message view
Top
From André Warnier ...@ice-sa.com>
Subject Re: [speculative] gc log filename variables in windows
Date Mon, 08 Oct 2012 20:30:44 GMT
```MrVJTod wrote:
> and I'm not going to convert my few remaining windows JVMs to use batch files
> instead of running as a service.
>
> this is just extra motivation to get these last windows JVMs converted to
> *nix.
>

I basically agree, and this is thus just a bit of intellectual musing :

In the Registry of my Windows XP laptop, under
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tomcat6, I see an "ImagePath" with a

value "C:\apache-tomcat-6.0.24\bin\tomcat6.exe //RS//Tomcat6".

(tomcat6.exe being this "service wrapper" I was mentioning before : it provides the
necessary wrapping to act as a Windows Service, and actually runs the JVM that runs Tomcat).

It may be possible to change this ImagePath to run a Windows .CMD file which would set the

appropriate "NOW" variable and then run the above wrapper .exe.

And then, using tomcat6w.exe (the GUI registry editor which allows to set the environment

which the wrapper passes to the JVM it runs), set a Java option including a reference to
%NOW%.

If pigs can fly (and it seems that in some countries many people think they can - see
http://planetsave.com/2011/03/28/can-pigs-fly/), it may even work.

Or, rather than playing around modifying things in the Registry, how about :
- create a user to run the Tomcat Service, and modify the Tomcat Service to run as that
user (rather than as "LocalSystem")
- give that user a "logon script"
- set the NOW variable in the logon script of that user
Windows may call that script whenever it starts the Tomcat Service.

Again, just idle speculation but hey, this is a Tomcat list, not a Windows one.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org