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

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

From: Santiago Pericas-Geertsen <Santiago.PericasGeertsen_at_oracle.com>
Date: Fri, 20 Apr 2012 11:55:00 -0400

On Apr 20, 2012, at 11:41 AM, Bill Burke wrote:

>
>
>>>>>>
>>>>>
>>>>> Another thing, if the sub-resource is an EJB or CDI bean, won't injection happen anyways?
>>>>
>>>> Yes, but not for @Context stuff, right?
>>>>
>>>
>>> Why wouldn't/shouldn't it?
>>
>> Because the EJB or CDI container don't understand the meaning of @Context?
>>
>
> Errr...they are supposed to. Hence section 6.2 of the specification?

 I'm not sure why you read it that way. It don't see how our specification can impose any requirements on other specifications, like CDI or EJB.

 You can certainly implement this by modifying your CDI and EJB implementations that integrate with your JAX-RS implementation, but this is just an implementation detail. The only thing that matters to the spec is the exposed semantics to the JAX-RS developer.

-- Santiago