Re: @Resource

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: @Resource

Paul Sandoz
Administrator
Jakub Podlesak wrote:
> On Mon, Jul 07, 2008 at 12:15:42PM +0200, Markus Karg wrote:
>> I have deployed a Jersey-0.8 based resource in GlassFish v2ur2.
>> It seems as if @Resource in my resource is not getting injected.
>> I assume that the reason is that my JAX-RS resource is not a managed component, while com.sun.jersey.spi.container.servlet.ServletContainer actually is one (it is a Servlet).
>
> At the moment, injection is managed by Jersey runtime.
> And AFAIK, support for @Resource is missing at the moment.
>

Right, Jersey is not fully EE compliant yet, this will only occur when
we sync up with EE 6, when it is ready.

In the interim time there is a pluggable injection mechanism you can
implement components for that may do what you require, see:

http://blogs.sun.com/sandoz/entry/ejb_injection


>> I can live with that for now (v2ur2), but how will that look like in GFv3? Will GFv3 treat JAX-RS resources as managed components (and such inject into those)?
>
> The support in GFv3 should be as you described.
> But if you want just tell me what you need to be injected,
> i can try to implement the injection provider for you to work
> already in GFv2.
>

It is not really a v2/v3 issue it is more of an EE issue.

Paul.

--
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...