tomee 1.6.0-SNAPSHOT, ejb example failing to inject @persistencecontext

2013-08-21 Thread jieryn
Greetings, I am using Apache TomEE 1.6.0-SNAPSHOT. I'm seeing a failure to inject a @PersistenceContext into a @Stateless DAO pattern inside Arquillian tests running in embedded TomEE. An example project is here: https://github.com/jieryn/javaee-example Notice that general DAO is injected into Po

Re: tomee 1.6.0-SNAPSHOT, ejb example failing to inject @persistencecontext

2013-08-21 Thread Romain Manni-Bucau
Hi does it work in plain tomee? *Romain Manni-Bucau* *Twitter: @rmannibucau * *Blog: **http://rmannibucau.wordpress.com/* *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* *Github: https://github.com/rmannibucau* 2013/8/21 j

Re: tomee 1.6.0-SNAPSHOT, ejb example failing to inject @persistencecontext

2013-08-21 Thread Romain Manni-Bucau
PS: final methods are forbidden in EJBs ;) *Romain Manni-Bucau* *Twitter: @rmannibucau * *Blog: **http://rmannibucau.wordpress.com/* *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* *Github: https://github.com/rmannibucau* 2

Re: tomee 1.6.0-SNAPSHOT, ejb example failing to inject @persistencecontext

2013-08-21 Thread jieryn
Thanks, removed that modifier. No change. On Wed, Aug 21, 2013 at 5:47 PM, Romain Manni-Bucau wrote: > PS: final methods are forbidden in EJBs ;)

Re: tomee 1.6.0-SNAPSHOT, ejb example failing to inject @persistencecontext

2013-08-21 Thread jieryn
Hi, On Wed, Aug 21, 2013 at 5:25 PM, Romain Manni-Bucau wrote: > Hi > does it work in plain tomee? I pushed some pom.xml updates that enable tomee:run, however it isn't being deployed properly there either.

Re: tomee 1.6.0-SNAPSHOT, ejb example failing to inject @persistencecontext

2013-08-21 Thread jieryn
Hi, On Wed, Aug 21, 2013 at 7:31 PM, jieryn wrote: > On Wed, Aug 21, 2013 at 5:25 PM, Romain Manni-Bucau > wrote: >> does it work in plain tomee? > > I pushed some pom.xml updates that enable tomee:run, however it isn't > being deployed properly there either. By not working, I mean, that the NP

Re: tomee 1.6.0-SNAPSHOT, ejb example failing to inject @persistencecontext

2013-08-21 Thread Romain Manni-Bucau
Removing it in DAO makes your test green Le 22 août 2013 01:33, "jieryn" a écrit : > Hi, > > On Wed, Aug 21, 2013 at 7:31 PM, jieryn wrote: > > On Wed, Aug 21, 2013 at 5:25 PM, Romain Manni-Bucau > > wrote: > >> does it work in plain tomee? > > > > I pushed some pom.xml updates that enable tome

Re: tomee 1.6.0-SNAPSHOT, ejb example failing to inject @persistencecontext

2013-08-22 Thread jieryn
On Thu, Aug 22, 2013 at 2:51 AM, Romain Manni-Bucau wrote: > Removing it in DAO makes your test green Ok, that worked for the DAO tests but not for the Service test. There's still a failure to inject the @EJB which is a @Path resource. It works live in tomee:run, but not in the @RunWith(Arquillia

Re: tomee 1.6.0-SNAPSHOT, ejb example failing to inject @persistencecontext

2013-08-22 Thread Romain Manni-Bucau
Your persistence.xml is not where ut should. Take care shrinkwrap api doest use webinf/classes/metainf for manifestresources in webarchive Le 22 août 2013 14:36, "jieryn" a écrit : > On Thu, Aug 22, 2013 at 2:51 AM, Romain Manni-Bucau > wrote: > > Removing it in DAO makes your test green > > Ok,

Re: tomee 1.6.0-SNAPSHOT, ejb example failing to inject @persistencecontext

2013-08-22 Thread jieryn
Greetings, On Thu, Aug 22, 2013 at 11:14 AM, Romain Manni-Bucau wrote: > Your persistence.xml is not where ut should. Take care shrinkwrap api doest > use webinf/classes/metainf for manifestresources in webarchive I think you are referring to src/test/resources/persistence.xml but this is just f

Re: tomee 1.6.0-SNAPSHOT, ejb example failing to inject @persistencecontext

2013-08-22 Thread Romain Manni-Bucau
No, i meant: .addAsManifestResource("persistence.xml") should be .addAsWebInfResource(new ClassLoaderAsset("persistence.xml"), "persistence.xml") and to get: @ArquillianResource private URL url; you should run your test as a client (@RunAsClient or @Deployment(testa

Re: tomee 1.6.0-SNAPSHOT, ejb example failing to inject @persistencecontext

2013-08-23 Thread Romain Manni-Bucau
btw removing selenium your test passes for me *Romain Manni-Bucau* *Twitter: @rmannibucau * *Blog: **http://rmannibucau.wordpress.com/* *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* *Github: https://github.com/rmannibucau*

Re: tomee 1.6.0-SNAPSHOT, ejb example failing to inject @persistencecontext

2013-09-05 Thread jieryn
Greetings, On Fri, Aug 23, 2013 at 3:16 AM, Romain Manni-Bucau wrote: > btw removing selenium your test passes for me Getting back into this.. I see that I had allowed surefire to ignore test failures. When I remove that maven plugin setting, the build fails. https://github.com/jieryn/javaee-ex

Re: tomee 1.6.0-SNAPSHOT, ejb example failing to inject @persistencecontext

2013-09-05 Thread Romain Manni-Bucau
Hi no, you need to specify it using arquillian @Transactional(ROLLBACK) either on the class or methods. Note: it only works in server side tests, not in client side ones *Romain Manni-Bucau* *Twitter: @rmannibucau * *Blog: **http://rmannibucau.wordpress.com/*

Re: tomee 1.6.0-SNAPSHOT, ejb example failing to inject @persistencecontext

2013-09-06 Thread jieryn
Greetings, On Thu, Sep 5, 2013 at 5:28 PM, Romain Manni-Bucau wrote: > no, you need to specify it using arquillian @Transactional(ROLLBACK) either > on the class or methods. > > Note: it only works in server side tests, not in client side ones Even after the @Transactional(ROLLBACK) addition, th

Re: tomee 1.6.0-SNAPSHOT, ejb example failing to inject @persistencecontext

2013-09-06 Thread jieryn
Greetings, On Fri, Sep 6, 2013 at 9:39 AM, jieryn wrote: > On Thu, Sep 5, 2013 at 5:28 PM, Romain Manni-Bucau > wrote: >> no, you need to specify it using arquillian @Transactional(ROLLBACK) either >> on the class or methods. >> Note: it only works in server side tests, not in client side ones >