Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 60010 invoked from network); 10 Feb 2006 04:28:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Feb 2006 04:28:17 -0000 Received: (qmail 5663 invoked by uid 500); 10 Feb 2006 04:28:16 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 5632 invoked by uid 500); 10 Feb 2006 04:28:16 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 5623 invoked by uid 99); 10 Feb 2006 04:28:16 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Feb 2006 20:28:16 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [32.97.110.150] (HELO e32.co.us.ibm.com) (32.97.110.150) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Feb 2006 20:28:15 -0800 Received: from westrelay02.boulder.ibm.com (westrelay02.boulder.ibm.com [9.17.195.11]) by e32.co.us.ibm.com (8.12.11/8.12.11) with ESMTP id k1A4RsAg008839 for ; Thu, 9 Feb 2006 23:27:54 -0500 Received: from d03av03.boulder.ibm.com (d03av03.boulder.ibm.com [9.17.195.169]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VERS6.8) with ESMTP id k1A4Pl47255958 for ; Thu, 9 Feb 2006 21:25:47 -0700 Received: from d03av03.boulder.ibm.com (loopback [127.0.0.1]) by d03av03.boulder.ibm.com (8.12.11/8.13.3) with ESMTP id k1A4RsuN007947 for ; Thu, 9 Feb 2006 21:27:54 -0700 Received: from [9.48.106.68] (sig-9-48-106-68.mts.ibm.com [9.48.106.68]) by d03av03.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id k1A4RjhJ007746 for ; Thu, 9 Feb 2006 21:27:51 -0700 Message-ID: <43EC1641.1060803@apache.org> Date: Thu, 09 Feb 2006 20:27:45 -0800 From: Daniel John Debrunner User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910 X-Accept-Language: en-us, en, de MIME-Version: 1.0 To: derby-dev@db.apache.org Subject: Re: conditional shutdown of the database References: <43EC0F51.7030900@sbcglobal.net> In-Reply-To: <43EC0F51.7030900@sbcglobal.net> X-Enigmail-Version: 0.90.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Kathey Marsden wrote: > I had asked on the user list if anyone had any ideas about how a user > could conditionally shutdown a database, so that the shutdown would only > occur if there were no active connections to the database. I could not > think of any way for the user to do this so am thinking of possibilities > for a solution on the development side. > > My thought is that we could allow a different value for the shutdown > attribute. > > shutdown=ifInactive ( or better name) > > and for the embedded DataSources, add > setShutdown("ifInactive") > > Does this seem like a reasonable enhancement? I haven't researched it > really, but thought I would first see if there were objections. What's the definition of inactive? No other connections, no other transactions active? If it was no transactions then wouldn't a select from the transaction table returning no rows almost fulfill the same purpose? I've often thought that a auto-shutdown based upon lack of activity would be a good thing, it would help to be tied in with auto-matic checkpointing/data flushing, maybe along the lines of what Raymond is thinking. Dan.