Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 95557 invoked from network); 23 Nov 2005 20:01:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 Nov 2005 20:01:32 -0000 Received: (qmail 46323 invoked by uid 500); 23 Nov 2005 20:01:31 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 46291 invoked by uid 500); 23 Nov 2005 20:01:31 -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 46282 invoked by uid 99); 23 Nov 2005 20:01:30 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Nov 2005 12:01:30 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=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; Wed, 23 Nov 2005 12:03:02 -0800 Received: from phys-mpk-1 ([129.146.11.81]) by brmea-mail-3.sun.com (8.12.10/8.12.9) with ESMTP id jANK193F010455 for ; Wed, 23 Nov 2005 13:01:09 -0700 (MST) Received: from conversion-daemon.mpk-mail1.sfbay.sun.com by mpk-mail1.sfbay.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) id <0IQF00101ABCRU@mpk-mail1.sfbay.sun.com> (original mail from David.Vancouvering@Sun.COM) for derby-dev@db.apache.org; Wed, 23 Nov 2005 12:01:09 -0800 (PST) Received: from [129.150.28.98] (vpn-129-150-28-98.SFBay.Sun.COM [129.150.28.98]) by mpk-mail1.sfbay.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) with ESMTP id <0IQF008JZBLSPI@mpk-mail1.sfbay.sun.com> for derby-dev@db.apache.org; Wed, 23 Nov 2005 12:01:06 -0800 (PST) Date: Wed, 23 Nov 2005 12:01:15 -0800 From: "David W. Van Couvering" Subject: Support multiple Derby systems in one VM To: Derby Development Message-id: <4384CA8B.1030607@sun.com> MIME-version: 1.0 Content-type: multipart/mixed; boundary="Boundary_(ID_jm8zvdOOv6M0bctjfWLs9Q)" X-Accept-Language: en-us, en User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. --Boundary_(ID_jm8zvdOOv6M0bctjfWLs9Q) Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT I also wanted to share an idea to help move us towards the larger problem supporting multiple Derby systems within the same VM (currently that's not possible). The idea is that we have a new public class called DerbySystem that's in it's own package. This is basically a data source factory for a given Derby system, each with its own classloader. So in the same VM I could do something like // Note the properties could be loaded from a config file rather // than hardcoded in the source Properties propsA = new Properties(); propsA.setProperty("derby.system.home", "/path/to/system/a"); propsA.setProperty("derby.system.classpath", "/home/derby/10.1/derby.jar"); DerbySystem systemA = new DerbySystem(propsA); Properties propsB = new Properties(); propsB.setProperty("derby.system.home", "/path/to/system/b"); propsA.setProperty("derby.system.classpath", "/home/derby/10.2/derby.jar"); DerbySystem systemB = new DerbySystem(propsB); DataSource dsA = systemA.getDataSource("jdbc:derby:wombat;create=true"); DataSource dsB = systemB.getDataSource("jdbc:derby:wombat;create=true"); Connection connA = dsA.getConnection(); Connection connB = dsB.getConnection(); Note that for this to really work we need to fix Derby so that there are no hardcoded uses of system properties, but instead all code uses a service to obtain configuration properties for a given system. David --Boundary_(ID_jm8zvdOOv6M0bctjfWLs9Q) Content-type: text/x-vcard; charset=utf-8; name=david.vancouvering.vcf Content-transfer-encoding: 7BIT Content-disposition: attachment; filename=david.vancouvering.vcf begin:vcard fn:David W Van Couvering n:Van Couvering;David W org:Sun Microsystems, Inc.;Database Technology Group email;internet:david.vancouvering@sun.com title:Senior Staff Software Engineer tel;work:510-550-6819 tel;cell:510-684-7281 x-mozilla-html:TRUE version:2.1 end:vcard --Boundary_(ID_jm8zvdOOv6M0bctjfWLs9Q)--