[jboss-jira] [JBoss JIRA] (WFLY-3640) EJB injection does not work in components added via Servlet Context

Eduardo Silva (JIRA) issues at jboss.org
Thu Dec 18 14:44:29 EST 2014


    [ https://issues.jboss.org/browse/WFLY-3640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13028828#comment-13028828 ] 

Eduardo Silva commented on WFLY-3640:
-------------------------------------

Is this still happening?
I've just tested with the 9.0.0.Alpha2-SNAPSHOT and I was not able to get the NullPointerException.

17:41:38,896 INFO  [stdout] (default task-1) before
17:41:38,905 INFO  [stdout] (default task-1) after

> EJB injection does not work in components added via Servlet Context
> -------------------------------------------------------------------
>
>                 Key: WFLY-3640
>                 URL: https://issues.jboss.org/browse/WFLY-3640
>             Project: WildFly
>          Issue Type: Bug
>          Components: Web (Undertow)
>    Affects Versions: 8.1.0.Final
>            Reporter: James Livingston
>             Fix For: Awaiting Volunteers
>
>         Attachments: reproducer.zip
>
>
> 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



--
This message was sent by Atlassian JIRA
(v6.3.11#6341)


More information about the jboss-jira mailing list