-
1. Re: CDI @Alternative problem with Arquillian
aslak Mar 5, 2012 4:14 PM (in response to armorer)Hmm.. wondering if you're running into a variety of this bug: http://java.net/jira/browse/GLASSFISH-16279
The reported bug is a problem related to activating Alternatives when alt-beans.jar is packaged in WEB-INF/lib.. in your case they are not activated when in EAR/ear-module.jar
Arquillian will create a test.war module with a empty beans.xml in the background and add it to your EAR. The injection into the TestClass happens from this WAR, and in your case, Glassfish seems to be using the WAR's bean manager and not the EJB's bean manager.
if that make sense based on what you are seeing, you can report it on the glassfish issue tracker..
-
2. Re: CDI @Alternative problem with Arquillian
christopherp Mar 22, 2012 9:42 PM (in response to armorer)1 of 1 people found this helpfulWorks if you deply as a .war:
protected static Archive<?> createWarArchive() {
return ShrinkWrap.create(WebArchive.class, "test.war")
.addPackages(true, WithInjectBean.class.getPackage())
.addAsWebInfResource("META-INF/beans.xml", ArchivePaths.create("beans.xml"));
}
-
3. Re: CDI @Alternative problem with Arquillian
salik Mar 15, 2013 8:49 AM (in response to christopherp)Doesnt work!