-
Enhancement
-
Resolution: Done
-
Major
-
None
-
None
-
---
-
---
If a deployment includes 'cruft' CDI beans that have fields annotated with jakarta.faces.annotation.ManagedProperty, allow the deployment to deploy even if if does not include any of the items[1] that trigger installation of the FacesServlet. The absence of the FacesServlet means the beans won't be accessible via HTTP requests, hence they are 'cruft'. But such cruft doesn't mean the deployment should fail.
As of the date I'm creating this JIRA the WIP Jakarta EE 10 Platform TCK includes such deployments, leading to the problem described in WFLY-16433. CDI sees the 'cruft' bean and the Inject annotation on a field. It tries to process the bean but fails due to not finding any bean to inject that has the ManagedProperty qualifier.
Expected solution is to update JSFVersionProcessor.shouldJsfActivate to return true if the ManagedProperty annotation is found in the deployment. That is sufficient to trigger loading of the com.sun.faces.cdi.CdiExtension which in turn ensures an appropriate bean with the ManagedProperty qualifier is installed. That allows the deployment to deploy.
Note that the intent here isn't to also trigger installation of the FacesServlet if it wasn't already being installed.
[1]See class javadoc at https://jakarta.ee/specifications/faces/4.0/apidocs/jakarta/faces/webapp/facesservlet
- blocks
-
WFLY-16433 Unsatisfied dependencies for @ManagedProperty in TCK ejb tests
- Closed
- is cloned by
-
JBEAP-24035 Allow deployments with 'unused' beans annotated with Jakarta Faces @ManagedProperty to deploy
- Resolved
- is related to
-
WFLY-16439 Remove testsuite use of javax.faces.bean annotations
- Closed