Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 73745 invoked from network); 14 Nov 2005 19:35:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 14 Nov 2005 19:35:01 -0000 Received: (qmail 75019 invoked by uid 500); 14 Nov 2005 19:35:00 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 74899 invoked by uid 500); 14 Nov 2005 19:34:59 -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 74888 invoked by uid 99); 14 Nov 2005 19:34:59 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Nov 2005 11:34:59 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=HTML_MESSAGE,HTML_OBFUSCATE_05_10,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [192.18.98.34] (HELO brmea-mail-3.sun.com) (192.18.98.34) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Nov 2005 11:34:50 -0800 Received: from fe-amer-09.sun.com ([192.18.108.183]) by brmea-mail-3.sun.com (8.12.10/8.12.9) with ESMTP id jAEJYb3F014569 for ; Mon, 14 Nov 2005 12:34:37 -0700 (MST) Received: from conversion-daemon.mail-amer.sun.com by mail-amer.sun.com (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) id <0IPY00M01M4P5600@mail-amer.sun.com> (original mail from Craig.Russell@Sun.COM) for derby-user@db.apache.org; Mon, 14 Nov 2005 12:34:37 -0700 (MST) Received: from [129.145.133.145] by mail-amer.sun.com (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPSA id <0IPY00620MDIPFG8@mail-amer.sun.com> for derby-user@db.apache.org; Mon, 14 Nov 2005 12:34:30 -0700 (MST) Date: Mon, 14 Nov 2005 11:34:29 -0800 From: Craig L Russell Subject: Re: Question about using URLClassLoader and Derby In-reply-to: <4378DE4D.3090903@sbcglobal.net> Sender: Craig.Russell@Sun.COM To: Derby Discussion Message-id: <3796042B-EAFE-48FD-ADC2-092B7A0E4AAE@sun.com> MIME-version: 1.0 X-Mailer: Apple Mail (2.746.2) Content-type: multipart/alternative; boundary="Boundary_(ID_lCXYYyCbuxI63x+4ExJh6Q)" References: <43722A1E.4000402@sbcglobal.net> <43752762.2030605@sun.com> <43789D4A.1040507@sbcglobal.net> <4378DE4D.3090903@sbcglobal.net> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --Boundary_(ID_lCXYYyCbuxI63x+4ExJh6Q) Content-type: text/plain; format=flowed; delsp=yes; charset=US-ASCII Content-transfer-encoding: 7BIT Hi, On Nov 14, 2005, at 10:58 AM, Kathey Marsden wrote: > Binod.Pg@Sun.COM wrote: > >> BTW, where would your application run? I am assuming it is outside of >> any managed environment like application server. > > Well, probably the farthest I might take a practical implementation > myself is to make some upgrade tests for Derby, but I want to provide > an example of how to load Derby in a ClassLoader so that a component > that embeds Derby can run in any environment without > interference or interfering others. For example, lets say my > component was something that you could embed in your application > to add > a dictionary capability. I'd like you to use my component, be > able to > use Derby however you want to, and be able to run in any > environment at > all without even knowing that I use Derby. I also want to make > sure the > dictionary API always uses the derby jars that I shipped and used for > my QA. > > I think the System properties can create a problem for application > servers too that might want to allow connection to different > versions of > Derby. I agree that a tricky part is how to specify properties for the different Derby databases that use different code bases. There is only one System Properties for a VM, and it's nailed pretty tight (you have to have privileges just to look at them!). Maybe the answer is for the Derby instance bound to the class loader to be passed the Properties that it would normally look for in System Properties. So instead of DataSource newDataSource(ClassLoader loader, String databaseName) it could be DataSource newDataSource (ClassLoader loader, Properties whatWouldNormallyBeInSystemPropertiesIncludingDatabaseName). Craig > > > Kathey > > Craig Russell Architect, Sun Java Enterprise System http://java.sun.com/products/jdo 408 276-5638 mailto:Craig.Russell@sun.com P.S. A good JDO? O, Gasp! --Boundary_(ID_lCXYYyCbuxI63x+4ExJh6Q) Content-type: text/html; charset=ISO-8859-1 Content-transfer-encoding: QUOTED-PRINTABLE Hi,

On Nov = 14, 2005, at 10:58 AM, Kathey Marsden wrote:

<= A href=3D"mailto:Binod.Pg@Sun.COM">Binod.Pg@Sun.COM wrote:
<= DIV style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; min-height: 14px; ">
BTW, where would your application run?= I am assuming it is outside of
any managed= environment like application server.

Well, pro= bably the farthest I might take a practical implementation=A0
mysel= f=A0 is to make some upg= rade tests for Derby, but I want to provide
an example of how to load Derby in a ClassLoader so that=A0 a component
that embeds Derby can run in any environment=A0 without
=A0 For example,= =A0 lets say my
component=A0 was something that you could em= bed in your application to add
a=A0 dictionary capability.=A0 I'd like you to use my compon= ent, be able to
use Derby however you want = to,=A0 and be able to ru= n in any environment at
all without even kn= owing that I use Derby.=A0 I also want to make sure the
dictionary = API=A0 always uses the d= erby jars that I shipped and used for
my QA= .

I think the System properties can=A0 create= =A0 a=A0 problem<= SPAN class=3D"Apple-converted-space">=A0 for application
=
servers too that might want to allow connection = to different versions of
Derby.

I agree that = a tricky part is how to specify properties for the different Derby da= tabases that use different code bases. There is only one System Prope= rties for a VM, and it's nailed pretty tight (you have to have privil= eges just to look at them!).

Maybe the answer is for the Derby instance bound t= o the class loader=A0to be passed the Properties that it would normal= ly look for in System Properties. So instead of=A0DataSource newDataS= ource(ClassLoader loader, String=A0databaseName) it could be=A0DataSo= urce newDataSource(ClassLoader loader, Properties whatWouldNormallyBe= InSystemPropertiesIncludingDatabaseName).

Craig

Kathey

=

=

Craig Ru= ssell

Archite= ct, Sun Java Enterprise System http://java.sun.com/products/jdo

408 276-5638 mailto:Craig.Russell@sun.com

P.S. A good JDO? O, Gasp!


--Boundary_(ID_lCXYYyCbuxI63x+4ExJh6Q)--