dev@glassfish.java.net

Re: _at_Resource question

From: Hong Zhang <Hong.Zhang_at_Sun.COM>
Date: Wed, 29 Nov 2006 09:55:46 -0500

Hi, Peter
   You are right about the mapping. Please file a glassfish issue for
this under deployment.
  
   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
>