Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 21982 invoked from network); 8 Dec 2005 18:42:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 8 Dec 2005 18:42:20 -0000 Received: (qmail 17050 invoked by uid 500); 8 Dec 2005 18:42:18 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 17031 invoked by uid 500); 8 Dec 2005 18:42:17 -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 17020 invoked by uid 99); 8 Dec 2005 18:42:17 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Dec 2005 10:42:17 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of tomdzk@gmail.com designates 64.233.182.195 as permitted sender) Received: from [64.233.182.195] (HELO nproxy.gmail.com) (64.233.182.195) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Dec 2005 10:42:16 -0800 Received: by nproxy.gmail.com with SMTP id h2so222834nfe for ; Thu, 08 Dec 2005 10:41:55 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=n6j1gLs+J6oLegHT5HnK7kiFh+f7qWyVdG2BoP+L4qL3o+i2dZpBpbu1h6Th6FGx+QRuInzC1tvxif3eUNTTq156h+ey2sP85IEken+/ipFz/nxClaBtyscEdWRQ66OnSCo0p4KSaDcdAnWUll8shNWDmIya07n8L8NTUW+SSgI= Received: by 10.48.222.3 with SMTP id u3mr313982nfg; Thu, 08 Dec 2005 10:41:55 -0800 (PST) Received: by 10.48.250.6 with HTTP; Thu, 8 Dec 2005 10:41:55 -0800 (PST) Message-ID: <224f32340512081041h39531e79sa905fb84bea144e7@mail.gmail.com> Date: Thu, 8 Dec 2005 19:41:55 +0100 From: Thomas Dudziak To: Derby Discussion Subject: Re: Why are classpath databases always read-only ? In-Reply-To: <43986653.8040509@debrunners.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <224f32340512080309s75d9cb83xf8fbd1ca9d8ee172@mail.gmail.com> <43984C40.3090507@debrunners.com> <224f32340512080826v2ed2b780ie0904a0f9d0591e5@mail.gmail.com> <43986653.8040509@debrunners.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On 12/8/05, Daniel John Debrunner wrote: > > Would you consider adding it ? I think that is would be really useful > > because it would decouple the app from where it runs (without having > > to run Derby in server mode). > > If the 'you' means me, then I don't have the time or the itch to add it. > I'm willing to provide guidance on how to do it. > > If the 'you' means the Derby community, then if someone provided this > functionality I can't see it being rejected. With you I meant the Derby developers. > > Sure, but that is exactly the point: the database is read-only. If I > > want to have an embedded database (e.g. co-located to the web app, > > say, in WEB-INF/classes/derbydb) then I have to use a jdbc directory > > url with an absoulte path which kind of defeats the concept of WARs. > > Or I have to determine the JDBC url at runtime as a workaround, but > > that IMHO is ugly. > > Maybe you could explain how this would work? Are you assuming that the > war/ear file is always unpacked into the local file system? Is that > guaranteed for a J2EE server? No I cannot assume that, but if (and my guess it should be possible to determine where a resource loaded from the classpath came from, e.g. whether the URL contains a jar: protocol) then this would work. And if not, it can obviously not be written. But for servlet containers like Tomcat and Jetty, one can ensure that the web app is unpackaged before it is started. Not to mention that this would be useful for normal (non-web) applications as well. Tom