From derby-user-return-1680-apmail-db-derby-user-archive=db.apache.org@db.apache.org Thu Aug 11 23:53:09 2005 Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 87704 invoked from network); 11 Aug 2005 23:53:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 11 Aug 2005 23:53:09 -0000 Received: (qmail 57789 invoked by uid 500); 11 Aug 2005 23:53:08 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 57769 invoked by uid 500); 11 Aug 2005 23:53:08 -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 57755 invoked by uid 99); 11 Aug 2005 23:53:08 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Aug 2005 16:53:07 -0700 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=SPF_HELO_FAIL X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [32.97.182.142] (HELO e2.ny.us.ibm.com) (32.97.182.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Aug 2005 16:53:28 -0700 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e2.ny.us.ibm.com (8.12.11/8.12.11) with ESMTP id j7BNr4Vb021839 for ; Thu, 11 Aug 2005 19:53:04 -0400 Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay04.pok.ibm.com (8.12.10/NCO/VERS6.7) with ESMTP id j7BNr4rR223896 for ; Thu, 11 Aug 2005 19:53:04 -0400 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.12.11/8.13.3) with ESMTP id j7BNr4PW020869 for ; Thu, 11 Aug 2005 19:53:04 -0400 Received: from [127.0.0.1] (bandaram-009030040193.svl.ibm.com [9.30.40.193]) by d01av03.pok.ibm.com (8.12.11/8.12.11) with ESMTP id j7BNr1H5020764 for ; Thu, 11 Aug 2005 19:53:04 -0400 Message-ID: <42FBE472.2020604@Sourcery.Org> Date: Thu, 11 Aug 2005 16:51:14 -0700 From: Satheesh Bandaram User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Derby Discussion Subject: Re: derby jdbc load driver References: <001801c59c06$60847f00$6601a8c0@BogdanMihaila> <42F89854.8020408@sun.com> <42F920E4.80200@Sourcery.Org> <42F9BC89.7020904@sun.com> In-Reply-To: <42F9BC89.7020904@sun.com> X-Enigmail-Version: 0.85.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 Agreed... Guess we should document this correctly. Shall I file a document bug or would you want to? Satheesh Oyvind.Bakksjo@Sun.COM wrote: > Satheesh Bandaram wrote: > >> I think Derby recommends using *.newInstance()* to load JDBC >> drivers... In fact, it is required if you plan to shutdown and reboot >> databases on the same thread/VM for Derby. Take a look at the javadoc >> for EmbeddedDriver. > > > Ok. But if Derby recommends it, then it should be explicitly mentioned > in the manuals (both in the Reference and the Developer's Guide), > which it isn't: > > http://db.apache.org/derby/docs/10.1/devguide/cdevdvlp40653.html > http://db.apache.org/derby/docs/10.1/ref/rrefjdbc32052.html > > Instead, there are contradicting statements like the one below: > > --------------- > * Class.forName("org.apache.derby.jdbc.EmbeddedDriver") > > Our recommended manner, because it ensures that the class is loaded in > all JVMs by creating an instance at the same time. > --------------- > > What instance? Since there is no .newInstance() here, this can be > understood as if the class has a static initializer which creates an > instance of the class. And if so, why should the application do > .newInstance()? >