[jboss-jira] [JBoss JIRA] (WFLY-3640) EJB injection does not work in components added via Servlet Context
James Livingston (JIRA)
issues at jboss.org
Fri Jul 18 01:42:29 EDT 2014
[ https://issues.jboss.org/browse/WFLY-3640?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James Livingston updated WFLY-3640:
-----------------------------------
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
was:
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 test case which adds a listener via a ServletContainerInitializer.
> 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
> Security Level: Public(Everyone can see)
> Components: Web (Undertow)
> Affects Versions: 8.1.0.Final
> Reporter: James Livingston
> Assignee: Stuart Douglas
> 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.2.6#6264)
More information about the jboss-jira
mailing list