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

Using ContextResolver for getting custom contexts injected

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Wed, 24 Jun 2015 12:19:44 +0000

Hi

is there any reason why the spec can not be enhanced to support using ContextResolver to have the custom contexts injected:

@Path("rs")
public class Root {
    @Context CustomContext context;

}

MyContextResolver implements ContextResolver<CustomContext> ?



It appears some users expect it to work this way ?
As far as I know ContextResolver is mainly used with JAXB providers to help resolve JAXB contexts, but may be it can be reasonable to reuse it for injecting the custom contexts too as opposed to coming up with some new standard mechanism to support the injection of custom contexts ?

Sergey