JSF 2.3 Table 5-3 JSF artifacts eligible for injection - Constructor Injection question


pnicoluc@...
 

Hi,

In the JAVAEE 8 Platform Specification there is Table EE.5-1 that lists component classes supporting injection. In this table the following JSF 2.3 artifacts are listed: JSF managed classes^b (support level Standard).

b. See the JSF specification section “JSF Managed Classes and Java EE Annotations” for a list of these managed classes.

The table in the JSF 2.3 specification for "JSF Managed Classes and Java EE Annotations" Table 5-3 lists the JSF artifacts that are eligible for injection. However, the example in the spec only details field and method injection and from the tests I've done neither MyFaces nor Mojarra support constructor injection on these artifacts.

I believe this is by design, however it causes confusion when reading the two specifications because the JavaEE 8 Platform Specification also says the following:

EE.5.24 Support for Dependency Injection
....
....
"Therefore, to make injection support more uniform across all Java EE component types, Java EE containers are required to support field, method, and
constructor injection using the javax.inject.Inject annotation into all component classes listed in Table EE.5-1 as having the “Standard” level of injection
support, as well as the use of interceptors for these classes.
"
...
...

Should we add a note to the JSF spec to be more clear about not supporting Constructor injection in the JSF artifacts listed in Table 5-3 and then in turn open a spec issues against the platform spec to say JSF is limited vs standard for support of Injection in EE.5-1?

Any additional thoughts?

Thanks,

Paul Nicolucci

Join jsf-spec@javaee.groups.io to automatically receive all group messages.