JSF 2.3 Table 5-3 JSF artifacts eligible for injection - Constructor Injection - Not supported
- Dominant language
- Java
- Stars
- 127
- Forks
- 59
- Avg merge
- 23h
- Merged PRs (30d)
- 7
Description
Expert Group thread here: https://javaee.groups.io/g/jsf-spec/topic/6068392#24
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?
Contributor guide
Research direction
Read the linked Expert Group thread, then compare Java EE 8 Platform Specification Table EE.5-1 and JSF 2.3 specification Table 5-3, including the section on JSF Managed Classes and Java EE Annotations. Clarify whether constructor injection is supported for the listed JSF artifacts and document the resulting JSF and platform-spec changes or follow-up issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100