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?
Looking forward to your feedback,
Marek