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

[jsr339-experts] Re: Open questions on JSR 330 support

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Wed, 25 Jan 2012 13:58:03 +0000

On 25/01/12 10:13, Marek Potociar wrote:
> Hello Experts,
>
> in the last few days Santiago& me revisited the proposal to enable JSR-330 support in JAX-RS 2.0. The original wiki
> material behind the proposal can be found here: http://java.net/projects/jax-rs-spec/pages/DI
>
> So far, we didn't received almost any feedback from EG on this topic. There are however several open questions I'd like
> to solicit your feedback on:
>
> - How to distinguish entity input parameter in HTTP method when using JSR-330 injection style (i.e. no @Context
> annotation on the method parameters)? We don't see an universally applicable solution for selecting the entity parameter
> from the list of all method parameters unless we somehow identify the entity (e.g. qualifier annotation).
>
> - How to support qualified providers?
> JSR330 injection points may be qualified. It's however not clear how to select the right providers for these injection
> points.
>
> - How to resolve potential conflict in CDI-managed resources and providers?
> The problem is that if the resource or provider classes use @Inject on fields/constructor also for JAX-RS managed types,
> we need to make sure the CDI provider has the proper information to be able to inject JAX-RS information. Currently the
> CDI will fail if the injection point is not satisfied.
>
> If we are not able to resolve these open issues quickly, we may need to consider dropping the DI support from the JAX-RS
> 2.0 spec. This also raises one more question:
>
> - Should we drop DI and once new CDI extension API is finalized, should we focus more on CDI instead?
>

I'd vote for making it out of scope for 2.0,

Cheers, Sergey

>
> Looking forward to your feedback,
> Marek


-- 
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
Blog: http://sberyozkin.blogspot.com