-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
WFLY-4185/WFLY-4350 introduced an ability to specify producers in Servlet listeners and other non-EJB Java-EE components.
This behavior is not compliant per CDI-spec, as discussed in WELD-1872.
Specifically, "Servlet listeners are not considered beans (even though they support injection and interception)." Therefore, no producers should be registered on servlet listeners to ensure portable compliant behavior.
However, pre-WFLY-4185 behavior is also not acceptable, since no warnings or errors are produced in response to encountering the producers in components that should have none and such components are ignored silently.
Therefore, I propose:
- Revert
WFLY-4185 - Add
- at a minimum, warning-level log messages when encountering managed bean annotations for non-bean components; or
- fail the deployment for strict compliance with the spec when encountering managed bean annotations for non-bean components