[jax-rs-spec users] Using ContextResolver for getting custom contexts injected

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


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

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 ?