Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 78871 invoked from network); 30 Dec 2009 01:57:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 30 Dec 2009 01:57:02 -0000 Received: (qmail 39333 invoked by uid 500); 30 Dec 2009 01:57:01 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 39244 invoked by uid 500); 30 Dec 2009 01:57:01 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 39236 invoked by uid 99); 30 Dec 2009 01:57:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Dec 2009 01:57:01 +0000 X-ASF-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of genspring@gmail.com designates 209.85.160.56 as permitted sender) Received: from [209.85.160.56] (HELO mail-pw0-f56.google.com) (209.85.160.56) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Dec 2009 01:56:54 +0000 Received: by pwi19 with SMTP id 19so8027704pwi.35 for ; Tue, 29 Dec 2009 17:56:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=Zbsbrji+eHa+ASo12p6Fs62SyFKHnryGTwuuegHg4N8=; b=RhEnOJgEXyGor+kXCgNWaG9tH/slx5IlwN3wenO6ZYIObKF2HzTjILKc6x33I+C8fv F23itOQIefnmkd7lqNDtjfgD/ohQT4XW6TcqajIURz9/S3OjVTRXJqHaRgWchsKpMa6W wBBgyU54dS4Tup7EMDCxoo4NZX0SaSY7nyqpk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=xxpTpBai0Nu3cSbjidADYYrEjcfM7laYwUHCj2p4aFP5qbcjnZP3ZKrsBV0GOEj14H z8tESzbyQRi0N5E7lTHOm2D7fO0o8Kp1mmwtWvURh6hy3Td3Ndb3NEV2vLNVFy9Y17ij YgoItEDxyi+J35BNO2yNGktm4nd9sBFtRYeQg= MIME-Version: 1.0 Received: by 10.141.107.17 with SMTP id j17mr12504887rvm.288.1262138194538; Tue, 29 Dec 2009 17:56:34 -0800 (PST) In-Reply-To: <45f744e40912291752u713f23cq92e089ae8544d821@mail.gmail.com> References: <45f744e40912290032r6fdb5cf6j9c2e9ed9fba1cdda@mail.gmail.com> <526DC013-DB9E-4ED8-AEAD-5FB8D62FFB59@yahoo.com> <45f744e40912291752u713f23cq92e089ae8544d821@mail.gmail.com> Date: Wed, 30 Dec 2009 09:56:34 +0800 Message-ID: Subject: Re: Create a geronimo-utils module to host those util methods From: Shawn Jiang To: dev@geronimo.apache.org Content-Type: multipart/alternative; boundary=000e0cd13b62be306b047be87284 --000e0cd13b62be306b047be87284 Content-Type: text/plain; charset=ISO-8859-1 On Wed, Dec 30, 2009 at 9:52 AM, Ivan wrote: > I did not count them preciously, just list that I found now, and I am sure > there shoud be more. > a. o.a.g.kernel.confg.IOUtils > b. org.apache.geronimo.deployment.util.DeploymentUtil > c. org.apache.geronimo.common.FileUtils > d. some stream operations in PluginInstallerGBean.copy, > CopyResourceContext.addFile, and etc. > > I understand the concern for a module with only 5 or 10 util classes. In > the beginning, I wish to put them in the geronimo-common module, but it has > a dependency on geronimo-kernel, which I did not like :-) > We can just put the centralized util to a package in geronimo-kernel because all packages in geronimo is depending on geronimo-kernel. So that we don't need to add new package and change the dependencies. Actually, I even have an idea that, once all the utils are centralized, we > could did some optimization for file copying or something else. > > , > > 2009/12/30 David Jencks > > How much duplication is there? I think there might be a danger of ending >> up with 5 or 10 util-type modules all with one class with 5 methods in them. >> IIRC geronimo-common started out with an idea like this. I like the idea >> of having a single implementation of commonly used utilities but like even >> more centralizing the functionality that uses these utilities. >> >> thanks >> david jencks >> >> >> On Dec 29, 2009, at 12:32 AM, Ivan wrote: >> >> Hi, >>> Some util methods ( such as copy, close stream quietly, and etc) are >>> widely used in the Geronimo, the question is that most codes host their own >>> implementations, some use a private method, some may create a util class in >>> its own package, others may use third-party components, for example >>> commons-io. >>> Since Geronimo 3.0 is under heavy development now. Shall we take this >>> chance to clean up those duplicate codes ? How about creating a >>> geronimo-utils module in the framework, the possible classes are FileUtils, >>> IOUtils, and etc. About the implmentation, we could just delegate some >>> methods to the third-party libraries if possible, for others, we might >>> implment them ourselves. >>> Any comment ? >>> >>> -- >>> Ivan >>> >> >> > > > -- > Ivan > -- Shawn --000e0cd13b62be306b047be87284 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Wed, Dec 30, 2009 at 9:52 AM, Ivan <xhhsld@gmail.com> wrote:
I did not count them preciously, just list that I found now, and I am sure = there shoud be more.
a. o.a.g.kernel.confg.IOUtils
b. org.apache.gero= nimo.deployment.util.DeploymentUtil
c. org.apache.geronimo.common.FileUt= ils
d. some stream operations in PluginInstallerGBean.copy, CopyResourceContext= .addFile, and etc.

I understand the=A0 concern for a module with onl= y 5 or 10 util classes. In the beginning, I wish to put them in the geronim= o-common module, but it has a dependency on geronimo-kernel, which I did no= t like=A0 :-)
=A0
We can just put the centralized util to a p= ackage in geronimo-kernel because all packages in geronimo is depending on = geronimo-kernel.=A0 So that we don't need to add new package and change= the dependencies.

Actually, I even have an idea that, once all the utils are centralized, we = could did some optimization for file copying or something else.

,
2009/12/30 David Jencks = <david_jenck= s@yahoo.com>

How much duplicat= ion is there? =A0I think there might be a danger of ending up with 5 or 10 = util-type modules all with one class with 5 methods in them. =A0IIRC geroni= mo-common started out with an idea like this. =A0I like the idea of having = a single implementation of commonly used utilities but like even more centr= alizing the functionality that uses these utilities.

thanks
david jencks


On Dec 29, 2009, at 12:32 AM, Ivan wrote:

Hi,
=A0 Some util methods ( such as copy, close stream quietly, and etc) are w= idely used in the Geronimo, the question is that most codes host their own = implementations, some use a private method, some may create a util class in= its own package, others may use third-party components, for example common= s-io.
=A0 Since Geronimo 3.0 is under heavy development now. Shall we take this = chance to clean up those duplicate codes ? How about creating a geronimo-ut= ils module in the framework, the possible classes are FileUtils, IOUtils, a= nd etc. About the implmentation, we could just delegate some methods to the= third-party libraries if possible, for others, we might implment them ours= elves.
=A0 Any comment ?

--
Ivan




-- Ivan



--
Shawn
--000e0cd13b62be306b047be87284--