[jax-rs-spec users] Re: CDI integration and _at_RequestScoped

From: Santiago Pericas-Geertsen <>
Date: Wed, 18 Feb 2015 09:16:05 -0500


 The spec clearly states that resource classes are in “per-request” scope by default in a few places. It also states that implementations can support other scopes.

 If a resource class is a CDI bean, then it should be created by CDI based on the whatever scope annotation it has on it.

 Not sure if that answers your question, though.

— Santiago

> On Feb 18, 2015, at 6:27 AM, Sergey Beryozkin <> wrote:
> Hi
> I've checked the spec and I'm not seeing any guidance re the scope of CDI JAX-RS root resource Beans, it only mentions that "providers or Application subclasses" have to be singleton or application-scoped.
> If a CDI root resource is annotated with @RequestScoped then does it mean the runtime is expected to ensure it is created once per every request ?
> Thanks, Sergey