geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan <xhh...@gmail.com>
Subject Re: Create a geronimo-utils module to host those util methods
Date Thu, 31 Dec 2009 07:37:34 GMT
Placing those utils in the geronimo-kernel is a choice, I will open a JIRA
for it. But I still wish to put it in a independent moudule in the future.

2009/12/30 Shawn Jiang <genspring@gmail.com>

>
>
> 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.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 <david_jencks@yahoo.com>
>>
>> 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
>



-- 
Ivan

Mime
View raw message