DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4994>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4994

Tomcat needs a mechanism for clean and certain shutdown

           Summary: Tomcat needs a mechanism for clean and certain shutdown
           Product: Tomcat 3
           Version: 3.2.3 Final
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Config
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


I've searched the web and posted this to tomcat-user without finding a 
solution, so I'm entering it here hoping that it might be considered a useful 
feature request. I'm entering this against 3.2.3 only because that it the 
version we're using at present. I believe that the same problem exists in 
Catalina. 

This problem stops us being able to use Tomcat for operational purposes. Other 
than that, we are very happy with Tomcat. Cheers, Andy.
----------------

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, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to