[jboss-jira] [JBoss JIRA] (JBAS-9555) CDI fails in multiple war inside ear - depends on war name
pugal srini (JIRA)
issues at jboss.org
Wed Jan 8 14:24:32 EST 2014
[ https://issues.jboss.org/browse/JBAS-9555?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
pugal srini updated JBAS-9555:
------------------------------
Steps to Reproduce:
The project build files are attached.
Have two wars with a Servlet injecting a regular POJO from the same war (HelloWorldServlet injecting HelloWorld class)
Deploy the ear that contains hello.war and goodbye.war.
The log shows that only one bean is injected - only HelloWorld is injected and Goodbye is null.
Now rename (or rebuild the ear with one war name changed) one of the war so that it is in different sorted order. (say hello.war to ahello.war or goodbye.war zgoodbye.war). When redeployed, now the HelloWorld is null and Goodbye is injected.
The project structure is as follows.
The maven source to build the project is attached.
hello_EAR.ear
+META-INF
application.xml
+hello.war
+WEB-INF
classes
com.hello.HelloWorldServlet.class
com.hello.HelloWorld.class
web.xml
beans.xml
META-INF
+goodbye.war
+WEB-INF
classes
com.hello.GoodbyeWorldServlet.class
com.hello.GoodbyeWorld.class
web.xml
beans.xml
+META-INF
was:
The project build files are in
https://community.jboss.org/thread/235933
Have two wars with a Servlet injecting a regular POJO from the same war (HelloWorldServlet injecting HelloWorld class)
Deploy the ear that contains hello.war and goodbye.war.
The log shows that only one bean is injected - only HelloWorld is injected and Goodbye is null.
Now rename (or rebuild the ear with one war name changed) one of the war so that it is in different sorted order. (say hello.war to ahello.war or goodbye.war zgoodbye.war). When redeployed, now the HelloWorld is null and Goodbye is injected.
The project structure is as follows.
The maven source to build the project is attached.
hello_EAR.ear
+META-INF
application.xml
+hello.war
+WEB-INF
classes
com.hello.HelloWorldServlet.class
com.hello.HelloWorld.class
web.xml
beans.xml
META-INF
+goodbye.war
+WEB-INF
classes
com.hello.GoodbyeWorldServlet.class
com.hello.GoodbyeWorld.class
web.xml
beans.xml
+META-INF
> CDI fails in multiple war inside ear - depends on war name
> ----------------------------------------------------------
>
> Key: JBAS-9555
> URL: https://issues.jboss.org/browse/JBAS-9555
> Project: Application Server 3 4 5 and 6
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Weld/CDI
> Affects Versions: 6.1.0
> Reporter: pugal srini
> Assignee: Marius Bogoevici
> Labels: ear, injection, war, weld
> Attachments: helloworld.zip
>
>
> CDI injection fails (is null) in a war when the ear contains more than one war file. The CDI succeeds/fails based on which war gets deployed first. If the any of the failed war is deployed alone, it succeeds.
> This issue does not happen in jboss AS 7 or EAP 6
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list