[jax-rs-spec users] Proposal: Make CDI constructor injection mandatory

From: Gunnar Morling <>
Date: Fri, 17 Feb 2017 20:17:50 +0100


When using CDI beans as REST-ful resources, the JAX-RS 2.0 spec only
mandates field and property injection, whereas constructor injection
is optional (section 10.2.7).

I'd like to propose to make support for constructor injection
mandatory in JAX-RS 2.1. I was quite surprised when I learned about
this limitation (I first thought it'd be a bug in our container
implementation), and I think others may find it unexpected, too. Also
there are good reasons for preferring constructor injection (e.g.
fields can be final), so support for it is desirable.

Thanks a lot for your consideration,