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

EJB injection does not work in components added via Servlet Context

    XMLWordPrintable

Details

    • Bug
    • Resolution: Obsolete
    • Major
    • None
    • 8.1.0.Final
    • Web (Undertow)
    • None

    Description

      You can add web components at runtime ServletContext.addListener() and similar methods. @EJB injection inside those components does not work and the field remains null. I have not yet tested whether other forms of injection work or not.

      I'm attaching a reproducer which adds a listener via a ServletContainerInitializer. Deploying the WAR and going to the root of the web app context (/scilistener-0.0.1-SNAPSHOT) will cause a NullPointerException

      Attachments

        Activity

          People

            Unassigned Unassigned
            rhn-support-jlivings James Livingston (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: