dev@glassfish.java.net

Re: Using jsr 330 annotations in GlassFish modules

From: John Wells <john.wells_at_oracle.com>
Date: Wed, 08 Feb 2012 09:52:47 -0500

On 2/8/2012 9:42 AM, Tim Quinn wrote:
>
> On Feb 8, 2012, at 8:27 AM, John Wells wrote:
>
>> In the cases I have looked at these classes would have been loaded in
>> any case, since they were used either as parameters to methods or
>> return types from methods. In other cases, it is possible we may
>> want to back off if we find classes where doing this refactoring
>> would lead to earlier class loading.
>>
>> The largest benefit of this refactoring IMO is to move glassfish away
>> from proprietary HK2 API and to the standard JSR-330 based API.
>
> And, in so doing, it would seem that the hk2 code base itself could
> shrink because it will no longer has to do what we'll rely on the 330
> implementation to do instead.
Yes, that is an excellent side benefit, but that is a benefit more for
hk2 than for glassfish.

I'd also like to point out that in this case IMO the standard API is
*better* than the proprietary API. So we aren't losing anything (and in
fact we are making things better) by moving toward the standard.

>
> - Tim
>
>>
>> On 2/8/2012 8:27 AM, Sahoo wrote:
>>> On Wednesday 08 February 2012 05:16 PM, John Wells wrote:
>>>> On the other hand, if it is the early loading of the class due to
>>>> the inclusion of the type in the parameterized type, then you could
>>>> be correct in that the class will get loaded earlier than it was
>>>> before.
>>> That's exactly what was my concern.
>>>
>>> One thing I wanted to ask though about this exercise. What benefit
>>> does all these refactoring bring to the code base?
>>>
>>> Sahoo
>