-
1. Re: Glassfish remote 3: failing test case
ljnelson Nov 24, 2010 2:47 PM (in response to ljnelson)(The SessionScopedBean is named that because originally I was trying to get it injected with @SessionScoped on it. But that didn't work, so I fell back on just @Dependent scope.)
-
2. Re: Glassfish remote 3: failing test case
aslak Nov 24, 2010 2:48 PM (in response to ljnelson)Could you try to just return the JavaArchive, not the EnterpriseArhcive ?
and what is the output of System.out.println(testCaseJar.toString(true)); ?
-
3. Re: Glassfish remote 3: failing test case
ljnelson Nov 24, 2010 3:04 PM (in response to aslak)First, the output:
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running ljnelson.weld761.TestCase
testCase.jar:
/META-INF/
/META-INF/beans.xml
/ljnelson/
/ljnelson/weld761/
/ljnelson/weld761/TestCase$SessionScopedBean.class
/ljnelson/weld761/TestCase$1.class
/ljnelson/weld761/TestCase$Gorp.class
/ljnelson/weld761/TestCase.class
test.ear:
/lib/
/lib/testCase.jarNow, on to the other thing. :-)
L
-
4. Re: Glassfish remote 3: failing test case
ljnelson Nov 24, 2010 3:05 PM (in response to aslak)That works. So it would appear, then, I've got a bug in Glassfish, right?
-
5. Re: Glassfish remote 3: failing test case
aslak Nov 24, 2010 3:14 PM (in response to ljnelson)No, it's probably due to the hirarchy of BeanManagers..
pr CDI spec a BeanManager is only exposed/created if a EE module contains a beans.xml.
Your jar should be threated as a EE Module since it contains a @Statless, but the Arquillian Test runner using a War, can not see the ejb jars bean manager. We're working on that part..
But when deployed as a Jar alone(it becomes a war) or a war, they are all in the same context..
-
6. Re: Glassfish remote 3: failing test case
ljnelson Nov 24, 2010 3:20 PM (in response to aslak)Any hackish way to affect the Arquillian war itself?
-
7. Re: Glassfish remote 3: failing test case
aslak Nov 24, 2010 3:46 PM (in response to ljnelson)hmm.. you can implement the ClassContextAppender SPI to add a EventHandler registered for callbacks on BeforeDeploy. Then get the Archive<?> from Context and manipulate it. That is tho your final Deployment so you'll have to find the test.war inside the ear and add a beans.xml to it..