dev@glassfish.java.net

Re: location/module/package for common code ...

From: kedar <Kedar.Mhaswade_at_Sun.COM>
Date: Wed, 13 Jan 2010 11:32:38 -0800

Jerome Dochez wrote:
> how big is that code ? your notion of reusable seems vague in your description, does it corresponds to requests made by several people or you just think it might be useful ?

The latter. I think multiple places in GlassFish code might be its clients
though. Also, this code is pretty small to begin with.

>
> also is it something only useful with the GF community or it's general enough ?

Can't decide at this point. But it can be general enough without any references
to GF.

The example, I am working on code available in ListCommandsCommand.java in
admin/cli. This code accepts the file globbing pattern (that Unix shells have
made popular [1]) and converts it into equivalent java.util.regex style regex.
Till now, for such a functionality, there was only one client and hence it was
a method in this class. But now, to fix another RFE [2], I need to extract this
functionality and put it at a common place. Hence the question.

[1] man glob
[2] https://glassfish.dev.java.net/issues/show_bug.cgi?id=11255

> On Jan 12, 2010, at 4:11 PM, Kedar Mhaswade wrote:
>
>> I need to find a place where I can place some code that I think is of
>> common interest. What is the most appropriate place for this?
>> Note that this is purely utility code (dare I say, it's like apache
>> commons) and not API of any kind. My expectation is that this code
>> will be useful to both server and other clients (e.g. asadmin, admin
>> GUI, upgrade tool etc.)
>>
>> Does v3/common/common-util sound right?
>>
>> Does org.glassfish.util.<some-distinguishing-name> sound like
>> the correct package name?
>>
>> We do have such code, but it is mostly under older package names
>> (com.sun.*) and the new hierarchy (org.glassfish) does not have a
>> package-info.java or package.html explaining what should go there.
>>
>> Thanks for suggestions.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>