Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 93629 invoked from network); 15 Nov 2005 14:23:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Nov 2005 14:23:32 -0000 Received: (qmail 10223 invoked by uid 500); 15 Nov 2005 14:23:22 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 10188 invoked by uid 500); 15 Nov 2005 14:23:21 -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 10177 invoked by uid 99); 15 Nov 2005 14:23:21 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Nov 2005 06:23:21 -0800 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 [32.97.182.146] (HELO e6.ny.us.ibm.com) (32.97.182.146) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Nov 2005 06:23:10 -0800 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e6.ny.us.ibm.com (8.12.11/8.12.11) with ESMTP id jAFEMugJ016980 for ; Tue, 15 Nov 2005 09:22:56 -0500 Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by d01relay04.pok.ibm.com (8.12.10/NCO/VERS6.8) with ESMTP id jAFEMu4F116542 for ; Tue, 15 Nov 2005 09:22:56 -0500 Received: from d01av01.pok.ibm.com (loopback [127.0.0.1]) by d01av01.pok.ibm.com (8.12.11/8.13.3) with ESMTP id jAFEMuME022198 for ; Tue, 15 Nov 2005 09:22:56 -0500 Received: from [127.0.0.1] (sig-9-48-111-171.mts.ibm.com [9.48.111.171]) by d01av01.pok.ibm.com (8.12.11/8.12.11) with ESMTP id jAFEMdIP020918 for ; Tue, 15 Nov 2005 09:22:52 -0500 Message-ID: <4379EF2E.8030103@debrunners.com> Date: Tue, 15 Nov 2005 06:22:38 -0800 From: Daniel John Debrunner User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910 X-Accept-Language: de, en-us, en MIME-Version: 1.0 To: derby-dev@db.apache.org Subject: Re: [jira] Updated: (DERBY-289) Enable code sharing between Derby client and engine References: <922737490.1131395000353.JavaMail.jira@ajax.apache.org> <437099FA.9000001@debrunners.com> <4371307C.5000608@sun.com> In-Reply-To: <4371307C.5000608@sun.com> X-Enigmail-Version: 0.90.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 David W. Van Couvering wrote: > Hi, Dan, I get it now. Yes, I think this is feasible, and I'll work on > that. The network client code could do something like > > throw ExceptionUtil.newSQLException(SQLState.ERRCODE, arg1, arg2); > > Meanwhile, your inspection of and comments on the rest of the patch > would be much appreciated! I got confused due to the naming of the classes org.apache.derby.common.CommonFeatures and CommonInfo. Given the concept of shared code and the use of 'common' of the top-level package and source directory, I thought they were generic classes. But it turns out they make up a specific instances of a shared component. If you like a common shared component, or common common component. :-) For instance, I started reading the code as if only one shared component could exist. Maybe I'm still confused, because CommonInfo is a specific instance of SharedComponentInfo but it uses a constant from CommonFeatures to implement its getMaxFeatureId(). The comments in CommonFeatures implies it holds the constants for multiple shared components, so why is MAX_FEATURE defined there, shouldn't it be specific to a shared component? And what is the benefit of having the constants in a single interface, why not have the feature constants in the shared component class, e.g. CommonInfo in this case? [Writing this paragraph I also was confused, it seemed like CommonFeatures would have code and CommonInfo would have the constants]. Looking to the future on this issue, would you expect the code for, say, a DRDA common component to be in the package org.apache.derby.common, or something like org.apache.derby.common.drda? The latter seems better, which would mean the common shared component code would logically move to org.apache.derby.common.common. Maybe it would be better to stick to the single terminology of shared for the general concept, leading to java/shared/org/apache/derby/shared, and use common for the specific shared component that is common (to?). The concept of max feature id must remain an implementation detail, not used by consumers of a shared component, as it won't work in the future if features are deprecated. The non-public aspect of getMaxFeatureId() in SharedComponentInfo seems to be the intent, but then to match that, the MAX_FEATURE constant needs to be not public. MessageUtil.EN is incorrectly named, and is not required, why not use java.util.Locale.US? For the MessageUtil classes, are all the public methods intended to be part of the public api, including methods like getCompleteMessage, formatMessage, composeDefaultMessage? package.html and the comments in the classes are not in sync: package.html: - Every time you add a new feature that is not forward-compatible, you need to add a new feature id CommonFeatures: Every time a new feature is added that a user of a shared component depends upon, a feature id should be added here. Dan.