jsr339-experts@jax-rs-spec.java.net

[jsr339-experts] Re: [jax-rs-spec users] Re: Back To DI in Subresources

From: Adam Bien <abien_at_adam-bien.com>
Date: Tue, 17 Apr 2012 20:57:44 +0200

On 17.04.2012, at 20:46, Bill Burke wrote:

>
>
> On 4/17/12 2:40 PM, Adam Bien wrote:
>>
>> On 17.04.2012, at 20:35, Bill Burke wrote:
>>
>>> a) @Inject is not part of Jax-rs
>> But the injection still works for managed resources.
>>> b) I don't think Java EE has a manual injection API.
>>
>> But is supported by Jersey. Sub-resources are a special case. Usually you are not creating your classes manually, for sub-resources you have to. Usually you want to pass the context (an ID) to the sub-resource. Thats the problem...
>>
>
> I'm talking about injection of @Resource, @EJB, etc...
>
> You'll have to be careful on the spec wording. Full injection can really only be supported in an integrated environment if there is no EE manual injection API.

Would it be acceptable to inject these things only having a full Java EE environment available? In Java SE mode nothing would happen (all deps would be null).
>
> Bill
>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com