Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 77590 invoked from network); 28 Oct 2008 23:15:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Oct 2008 23:15:55 -0000 Received: (qmail 59285 invoked by uid 500); 28 Oct 2008 23:15:58 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 59265 invoked by uid 500); 28 Oct 2008 23:15:57 -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 Delivered-To: moderator for derby-user@db.apache.org Received: (qmail 29153 invoked by uid 99); 28 Oct 2008 13:33:00 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=SPF_PASS,STOX_REPLY_TYPE X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; format=flowed; charset=iso-8859-1; reply-type=original Message-id: <000301c93901$6a840fc0$720411ac@martin> Reply-to: martin stanik From: martin stanik To: derby-user@db.apache.org Subject: should derby use addShutdownHook() out of box? Date: Tue, 28 Oct 2008 14:30:58 +0100 X-Priority: 3 X-MSMail-priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Virus-Checked: Checked by ClamAV on apache.org hi, I (silly boy) do not understand why derby engine needs to be shut down using DriverManager.getConnection("jdbc:derby:;shutdown=true"); My application uses datasource, which is _sometimes_ configured to use derby. I do not like always execute the statement, as derby might be not in use and it could cause loading derby classes. I do not like idea to investigate my datasource if it does use derby or not. Since 1.3 we have Runtime.addShutdownHook() - for me it looks like perfect solution and derby should use it by default after starting engine. Am i wrong? Where i could found arguments? thanks, martin