On 4/20/12 11:55 AM, Santiago Pericas-Geertsen wrote:
>
> 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.
>
The wording in the spec already implies that JAX-RS injection
annotations must be supported in a Java EE environment. Any container
that doesn't, IMO, is in-the-least a very deficient container, if not
violating the specification.
BTW, Its not putting a requirement on CDI or EJB. Its putting a
requirement on the Java EE container to support JAX-RS injection into
CDI, EJB, and ManagedBeans.
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com