Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2CC04D87B for ; Mon, 18 Mar 2013 17:39:21 +0000 (UTC) Received: (qmail 12761 invoked by uid 500); 18 Mar 2013 17:39:17 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 12558 invoked by uid 500); 18 Mar 2013 17:39:17 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 12549 invoked by uid 99); 18 Mar 2013 17:39:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Mar 2013 17:39:17 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of aw@ice-sa.com designates 212.85.38.228 as permitted sender) Received: from [212.85.38.228] (HELO tor.combios.es) (212.85.38.228) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Mar 2013 17:39:08 +0000 Received: from [192.168.245.129] (montserrat.wissensbank.com [212.85.37.175]) (Authenticated sender: andre.warnier@ice-sa.com) by tor.combios.es (Postfix) with ESMTPA id 281133C278E for ; Mon, 18 Mar 2013 18:39:13 +0100 (CET) Message-ID: <51475127.7060909@ice-sa.com> Date: Mon, 18 Mar 2013 18:38:47 +0100 From: =?ISO-8859-1?Q?Andr=E9_Warnier?= Reply-To: Tomcat Users List User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Procrun and Tomcat service/OS shutdown on Windows References: <7710CE26658AD84CB8E3CE40308847F630D95DED@SCINTEXC01.corpnet.intermec.com> <7215BA462D00D343B2837F9113F0131F0146F0AFEF@POSTOFFICE02.polydyne.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Harris, Jeffrey E. wrote: > >> -----Original Message----- >> From: Jeffrey Janner [mailto:Jeffrey.Janner@PolyDyne.com] >> Sent: Monday, March 18, 2013 12:27 PM >> To: 'Tomcat Users List' >> Subject: RE: Procrun and Tomcat service/OS shutdown on Windows >> >>> -----Original Message----- >>> From: Harris, Jeffrey E. [mailto:Jeffrey.Harris@ManTech.com] >>> Sent: Thursday, March 14, 2013 11:52 AM >>> To: Tomcat Users List >>> Subject: RE: Procrun and Tomcat service/OS shutdown on Windows >>> >>> Edit the registry so Tomcat depends on the HSQLDB shutdown. This >> only >>> works if HSQLDB is also started as a service. >>> >>> Edit the service entry in the registry (under >>> HKEY_Local_Machine\system\currentcontrolset\services\>> Name>) so Tomcat depends on HSQLDB. This only works if HSQLDB is >> also >>> started as a service. If HSQLDB is started some other way (i.e., by >>> the Tomcat web app), you can try and install it as a service using >> the >>> srvany utility (or possibly the sc utility). >>> >>> If you can configure Tomcat to be dependent on HSQLDB, this will also >>> force HSQLDB to start before Tomcat. >>> >> I just wanted to post a word of warning on depending on this last >> "feature". >> While Windows will start the HSQLDB server before the Tomcat server, it >> doesn't necessarily imply that the DB will be ready for service. As >> soon as the HSQLDB service reports "started", Windows will start the >> next service that's dependant on it. You will want to verify the >> behavior of your database before relying on this feature. >> Spoken as one bitten by trying to do this with Oracle some years back. >> The Oracle DB will report started looong before the recovery process is >> complete and the DB is open for connections. >> Jeff >> > > Good point! > An additional note maybe : This may or may not be applicable to Tomcat running as a Service through procrun, but having written programs in Perl which act as Windows Services, I know that the "service program" itself can indicate to Windows how long it will take to start it as a service or stop it as a service. This then conditions Windows (probably the "Windows Service Manager") to wait that long, before it declares the Service as non-responsive (and, in the case of a "stop service" signal, starts taking more drastic action). For example, this impacts the "progress bar" which you see during a "start service" or "stop service" action in the GUI interaction with Services. If the Service tells Windows that it needs one full minute to start, then that progress bar will take a minute to reach 100%. I do not know if procrun currently allows the setting of this kind of parameter. But if it doesn't, and if this would help you, you could always file an enhancement request. Note that I do use this in the programs mentioned above, without really understanding how it works deep down. It is all a bit weird, because it doesn't seem to be 100% deterministic, and involves a Windows "Event loop" with "messages" between the program and the Service Manager. But in my case it does work for where I wanted it to work, and I never dug deeper. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org