This content has been marked as final.
Show 4 replies
-
1. Re: What could prevent PersistenceContext injection?
aslak Aug 30, 2011 9:12 AM (in response to jjfraney)PersistenceContext injection in the TestClass is only supported if you use CDI, e.g. have a beans.xml in your Deployment.
-
2. Re: What could prevent PersistenceContext injection?
viggo.navarsete Sep 20, 2011 1:26 PM (in response to aslak)It works when having beans.xml in the Deployment, BUT it's not accessible in @BeforeClass annotated method. Any reason for that?
-
3. Re: What could prevent PersistenceContext injection?
aslak Sep 20, 2011 4:44 PM (in response to viggo.navarsete)Arquillian use the @Before phase to do injection. So not currently supported in BeforeClass. In -> CRX BeforeClass is only executed on client side regard less of runmode as well, this is based on how the tests are executed incontainer, where the whole lifecycle is reexecuted pr @Test, so @BeforeClass is a missleading.
-
4. Re: What could prevent PersistenceContext injection?
viggo.navarsete Sep 21, 2011 5:14 AM (in response to aslak)See your point Aslak, case closed