dev@glassfish.java.net

Re: _at_Resource question

From: Hong Zhang <Hong.Zhang_at_Sun.COM>
Date: Fri, 01 Dec 2006 19:06:56 -0500

Hi, Peter

> Was this fix checked to be sure it covers all field types referenced
> in 2.4 correctly?

Yes. Please let me know if you see any problem.

Thanks,

- Hong

>
>
> Hong Zhang wrote:
>
>> Hi, Peter
>> This problem is now fixed as part of the fix for issue 1121.
>> https://glassfish.dev.java.net/issues/show_bug.cgi?id=1121
>>
>> The fix will be available from tomorrow's nightly build.
>>
>> Thanks,
>>
>> - Hong
>>
>> Peter Williams wrote:
>>
>>> vince kraemer wrote:
>>>
>>>> Peter Williams wrote:
>>>>
>>>>> I have the following annotation in a servlet (JavaEE5 webapp)
>>>>>
>>>>> @Resource java.util.Data myData;
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Do you mean java.util.Date... instead of java.util.Data...?
>>>
>>>
>>>
>>>
>>> Doh!. Yes, that's what I meant.
>>>
>>> (though if such a class existed, it would still demonstrate this bug
>>> since Table 2.4 says "everything else" should be resolved to
>>> resource-env-ref, not resource-ref.)
>>>
>>>>>
>>>>> Upon deployment, in the generated web.xml, this is being resolved
>>>>> to a descriptor entry of type resource-ref.
>>>>>
>>>>> According to JSR 154 SRV 14.5.1 and JSR 250 section 2.3 (and Table
>>>>> 2.4), this should have been resolved to a resource-env-ref.
>>>>>
>>>>> Could someone responsible for resource injection in Glassfish
>>>>> confirm this interpretation? I think this needs to be fixed in
>>>>> the next update release (whatever will be synced w/ NB 5.5.1). If
>>>>> a developer has such a field and supplies a JNDI name for it via a
>>>>> resource-env-ref entry in sun-web.xml, the resulting application
>>>>> _cannot_ be deployed.
>>>>>
>>>>> As far as I can tell, there is no work-around except possibly to
>>>>> define the resource injection manually in web.xml -- not very nice.
>>>>>
>>>>> -Peter
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> 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
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>