Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-4353

Incompliant CDI behavior since WFLY-4185

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • CDI / Weld
    • 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:

      1. Revert WFLY-4185
      2. Add
        1. at a minimum, warning-level log messages when encountering managed bean annotations for non-bean components; or
        2. fail the deployment for strict compliance with the spec when encountering managed bean annotations for non-bean components

              Unassigned Unassigned
              arcivanov_jira Arcadiy Ivanov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: