Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 84138 invoked from network); 6 Apr 2010 18:08:05 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 6 Apr 2010 18:08:05 -0000 Received: (qmail 76028 invoked by uid 500); 6 Apr 2010 18:08:05 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 75992 invoked by uid 500); 6 Apr 2010 18:08:05 -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 75985 invoked by uid 99); 6 Apr 2010 18:08:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Apr 2010 18:08:05 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of dmclean62@gmail.com designates 74.125.83.44 as permitted sender) Received: from [74.125.83.44] (HELO mail-gw0-f44.google.com) (74.125.83.44) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Apr 2010 18:07:59 +0000 Received: by gwaa20 with SMTP id a20so53890gwa.31 for ; Tue, 06 Apr 2010 11:07:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:content-type :content-transfer-encoding; bh=pZl8oE9wENMhM4rtpPE6vLfWjWkz+Kq2EssffAI9mbY=; b=I50gdvU4LtIZLOzHXwIpOeOwAMya2iN3JJ8NnThpRr7ks2lMIlQGBznsiUwZ8UIA/j AiGx5XcOPfnjfMQ/qVjp3/7Ta0WrFF4TRgK7X03AALCGyRVS3fHVbHxsWpm6xGTWEF6f 72Ax6WXxpYPH7dgx+xTmNsqIPETW0yR3+u0C8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=N6ZlFY6DRaycyFbKAPzTNRCOVJY6rcZzBj+0ek38sT+bcd7VOEJYLnT7gFr6kyiaHy B5albFRjenUuBRvBwJgpSnu8WUXkFQETsklInVZhcWu8unb2+WWo0HzHfJpmT9nFp5MM n8gvTFY0GDJ3iYMXNJYAgDcJY/XCG9LtixozA= MIME-Version: 1.0 Received: by 10.100.31.6 with HTTP; Tue, 6 Apr 2010 11:07:08 -0700 (PDT) In-Reply-To: References: Date: Tue, 6 Apr 2010 14:07:08 -0400 Received: by 10.101.179.5 with SMTP id g5mr16867435anp.59.1270577229772; Tue, 06 Apr 2010 11:07:09 -0700 (PDT) Message-ID: Subject: Re: Determining when shutdown is complete. From: Donald McLean To: Derby Discussion Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Are you talking about embedded Derby databases? If you are, the shutdown always raises an exception when it finishes. Otherwise, perhaps some more details would be a good idea. Donald On Tue, Apr 6, 2010 at 1:53 PM, David Van Couvering wrote: > Hi, all. > > In my application environment I am using multiple databases, and when I h= ave > no users of the database, I need to shut it down, or I can run out of mem= ory > or open files (I am maintaining a lot of databases). > > But this is a multithreaded environment, and I could have another thread > immediately attempt to connect to the a database that is in the process o= f > shutting down. > > Is there a way for me to find out when shutdown is complete, so I can blo= ck > other threads from trying to connect until the job is done?=A0 I suppose = I > could just poll, trying to open a new connection and catching exceptions, > until it stops failing, but is there a better way? --=20 Family photographs are a critical legacy for ourselves and our descendants. Protect that legacy with a digital backup and recovery plan. Join the photo preservation advocacy Facebook group: http://www.facebook.com/home.php?ref=3Dlogo#/group.php?gid=3D148274709288