From derby-user-return-15129-apmail-db-derby-user-archive=db.apache.org@db.apache.org Tue Jul 30 20:58:55 2013 Return-Path: X-Original-To: apmail-db-derby-user-archive@www.apache.org Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 125A5108A1 for ; Tue, 30 Jul 2013 20:58:55 +0000 (UTC) Received: (qmail 41643 invoked by uid 500); 30 Jul 2013 20:58:54 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 41616 invoked by uid 500); 30 Jul 2013 20:58:54 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 41609 invoked by uid 99); 30 Jul 2013 20:58:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Jul 2013 20:58:53 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE X-Spam-Check-By: apache.org Received-SPF: error (nike.apache.org: local policy) Received: from [93.17.128.20] (HELO smtp23.services.sfr.fr) (93.17.128.20) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Jul 2013 20:58:47 +0000 Received: from filter.sfr.fr (localhost [127.0.0.1]) by msfrf2309.sfr.fr (SMTP Server) with ESMTP id 042EA70000BB for ; Tue, 30 Jul 2013 22:58:06 +0200 (CEST) Received: from [192.168.1.31] (82.17.14.81.rev.sfr.net [81.14.17.82]) by msfrf2309.sfr.fr (SMTP Server) with ESMTP id CD22C7000094 for ; Tue, 30 Jul 2013 22:58:05 +0200 (CEST) X-SFR-UUID: 20130730205805840.CD22C7000094@msfrf2309.sfr.fr Message-ID: <51F828DD.90807@yahoo.fr> Date: Tue, 30 Jul 2013 22:58:05 +0200 From: Mo Maison User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130704 Icedove/17.0.7 MIME-Version: 1.0 To: derby-user@db.apache.org Subject: Re: NetworkServerControl shutdown References: <51F1496B.8040608@sbcglobal.net> In-Reply-To: <51F1496B.8040608@sbcglobal.net> Content-Type: multipart/alternative; boundary=------------050209050405090808080106 X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. --------------050209050405090808080106 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Hello, From my experiments, checking connection does not work as server is closing socket _before_ shutting down databases. And it appears that shutting down a DB can require quite a long time (I observed once 35 seconds, with a ~30MB DB). So I had to wait for db files locks disappearance in a polling loop. See old thread (not meaningful) : http://osdir.com/ml/derby-user-db-apache/2012-07/msg00066.html This kind of problematic should be managed by derby server itself rather than by client (relying on a Derby internal feature). M. Le 25/07/2013 17:51, Katherine Marsden a écrit : > On 7/25/2013 6:45 AM, Rong Qu wrote: >> We use "NetworkServerControl shutdown" to stop derby network server. >> We noticed sometimes, the server was not stopped immediately. >> wondering if there is a simple way to verify the server was >> completely stopped. e.g. some DB lock file. >> >> Thanks for any help you can provide. > > Hi Rong, > > You can use NetworkServerControl.ping to see if the server is still up. > http://db.apache.org/derby/docs/10.8/publishedapi/jdbc3/org/apache/derby/drda/NetworkServerControl.html#ping > > Thanks > > Kathey > --------------050209050405090808080106 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit

Hello,

From my experiments, checking connection does not work
as server is closing socket _before_ shutting down databases.
And it appears that shutting down a DB can require quite a long time
(I observed once 35 seconds, with a ~30MB DB).
So I had to wait for db files locks disappearance in a polling loop.
See old thread (not meaningful) :
http://osdir.com/ml/derby-user-db-apache/2012-07/msg00066.html

This kind of problematic should be managed by derby server itself
rather than by client (relying on a Derby internal feature).

M.

Le 25/07/2013 17:51, Katherine Marsden a écrit :
On 7/25/2013 6:45 AM, Rong Qu wrote:
We use "NetworkServerControl shutdown" to stop derby network server. We noticed sometimes, the server was not stopped immediately. wondering if there is a simple way to verify the server was completely stopped. e.g. some DB lock file.
 
Thanks for any help you can provide.

Hi Rong,

You can use NetworkServerControl.ping to see if the server is still up.
http://db.apache.org/derby/docs/10.8/publishedapi/jdbc3/org/apache/derby/drda/NetworkServerControl.html#ping

Thanks

Kathey


--------------050209050405090808080106--