From derby-dev-return-8136-apmail-db-derby-dev-archive=db.apache.org@db.apache.org Sun Sep 04 15:50:02 2005 Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 21679 invoked from network); 4 Sep 2005 15:50:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Sep 2005 15:50:02 -0000 Received: (qmail 87727 invoked by uid 500); 4 Sep 2005 15:50:01 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 87688 invoked by uid 500); 4 Sep 2005 15:50:01 -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: "Derby Development" Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 87675 invoked by uid 99); 4 Sep 2005 15:50:01 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Sep 2005 08:50:01 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [64.14.202.141] (HELO mgd.gluecode.com) (64.14.202.141) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Sep 2005 08:50:14 -0700 Received: from [192.168.37.166] (adsl-209-233-18-245.dsl.snfc21.pacbell.net [209.233.18.245]) (authenticated bits=0) by mgd.gluecode.com (8.12.10/8.12.10) with ESMTP id j84FmYCW013901 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 4 Sep 2005 08:48:35 -0700 Message-ID: <431B17A4.1090409@apache.org> Date: Sun, 04 Sep 2005 08:49:56 -0700 From: Jeremy Boynes User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Derby Development Subject: Re: Sharing code References: <43178204.1090107@sun.com> In-Reply-To: <43178204.1090107@sun.com> X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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 David W. Van Couvering wrote: > > The common classes will be placed into both derby.jar and > derbyclient.jar. When you have a classpath with a network client at one > revision and the embedded driver at another revision, the jar with the > highest revision should always go first, e.g > "/home/derby/10.2/derbyclient.jar:/home/derby/10.1/derby.jar". This > ensures that the newer code that depends on new interfaces (e.g. a new > method for a class) will be able to function properly. Others have pointed out the problems here with classpath ordering. The root of this is that the same classes are being included in multiple jars leading to potential duplication. This can be avoided by placing them in a separate jar so that each is only present once e.g. derby-10.2.jar:derbyclient-10.2.jar:derbycommon-10.2.jar The downside of this is that multiple jars need to be included to form a complete solution. Concern has been expressed in the past about exceeding the length of the CLASSPATH environment variable. However, most frameworks today, including J2EE, do not use that mechanism to include libraries relying instead on features like the manifest classpath, extensions, WEB-INF/lib, uber-jar or others provided by a container environment. IMO the benefits of a more modular structure and a clear lack of duplication exceed the benefits of a bundled distribution and I would prefer to see the common code distributed separately. -- Jeremy