Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 31605 invoked from network); 19 Nov 2001 18:04:54 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 19 Nov 2001 18:04:54 -0000 Received: (qmail 22292 invoked by uid 97); 19 Nov 2001 18:04:09 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 22233 invoked by uid 97); 19 Nov 2001 18:04:06 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 22220 invoked from network); 19 Nov 2001 18:04:06 -0000 Message-ID: <4FFB2DC0BF24D311906100C00D00CC9842F4CC@ThisAddressDoesNotExist> From: Andy Newton To: "'tomcat-user@jakarta.apache.org'" Subject: looking for a Tomcat stop option which waits for Tomcat to really exit Date: Mon, 19 Nov 2001 18:03:46 -0000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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: For additional commands: Troubles with the list: