tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Newton <Andy.New...@lazysoft.com>
Subject looking for a Tomcat stop option which waits for Tomcat to really exit
Date Mon, 19 Nov 2001 18:03:46 GMT
Hi all,

I have a problem with stopping Tomcat reliably, initially as part of an NT
system shutdown though I think the problem applies independent of OS.

As best I understand it, when Tomcat is stopped by the conventional means
(i.e. org.apache.tomcat.startup.Tomcat -stop) the stop action returns before
the running Tomcat server has actually completed. This causes me a problem.

When this action is part of a system shutdown we can end up with the Tomcat
shutdown process failing to complete, before it gets killed. Given that our
contexts can be running database updates, this is not a good situation.

We're using Tomcat 3.2.3 at present and need to run on Java 1.3. The
specific problem is on NT, but I believe that the root cause is the way
Tomcat stop works, making it is OS independent. That is, it opens a
connection via AJP12, sends a 'stop' message, and exits. If there is an
acknowledgement of this from the stopping process, it is returned a good
time before the final exit occurs. (Sorry for the uncertainty, I should have
but haven't looked at the source yet).

On *nix there would be some simple if in-elegant work-around based on
sleeping the shutdown process. Even that doesn't seem to be available on NT.
We've tried various NT service options (e.g. JavaService from Alexandria)
and IIS in-process set-up, but none of them actually wait for Tomcat to
exit. We've not tried the "Jakarta NT Service" as it is currently marked as
not working on Java 1.3. 

So what we have not found is a way to shutdown Tomcat cleanly which waits
for it to actually shutdown before returning, and allowing the system
shutdown to continue. We could code up our own wrapper for start and stop
but would prefer not to (we want to be able to run with existing Tomcat
installations).

Finally, some questions:

1. Is there another standard mechanism for stopping Tomcat which will wait
for it to really shutdown?
2. Is there a parameter to org.apache.tomcat.startup.Tomcat -stop which
would do this?
3. If not, are there changes in the Stop process in 3.3 or 4.0, which might
help me?
4. If not, is anyone aware of this being considered as an enhancement to
Tomcat?
5. If this is an issue for other people, and an enhancement to 'stop' would
make sense, then let me know. I hope we could contribute it.

Thanks for reading this. Any useful input on will be appreciated.

Andy

--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message