Skip to content
This repository was archived by the owner on Sep 5, 2023. It is now read-only.
This repository was archived by the owner on Sep 5, 2023. It is now read-only.

JSF 2.3 Table 5-3 JSF artifacts eligible for injection - Constructor Injection - Not supported #1455

@pnicolucci

Description

@pnicolucci

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions