Testing complex(?) CDI + EJB (+ ApplicationComposer) + JPA scenario brings up some questions

2013-04-10 Thread Reinis Vicups
Hi guys, got following scenario @org.junit.runner.RunWith(org.apache.openejb.junit.ApplicationComposer) public class IamIntegrationTest{ // ACHTUNG! @javax.enterprise.inject.Produces @javax.enterprise.inject.New HeavyProcessingController heavyProcessingController;

Re: Testing complex(?) CDI + EJB (+ ApplicationComposer) + JPA scenario brings up some questions

2013-04-10 Thread Romain Manni-Bucau
Hi, which version? did you try the snapshot? *Romain Manni-Bucau* *Twitter: @rmannibucau https://twitter.com/rmannibucau* *Blog: **http://rmannibucau.wordpress.com/*http://rmannibucau.wordpress.com/ *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* *Github: https://github.com/rmannibucau*

Re: Testing complex(?) CDI + EJB (+ ApplicationComposer) + JPA scenario brings up some questions

2013-04-10 Thread John D. Ament
What you're seeing is correct (though I'm not a good one to ask why it's only at the trace level that you see this exception). I guess, why is HeavyProcessingControllerProdu**cer session scoped? There is no HTTP Session when this unit test runs, so no it won't be active at that time. On Wed,

Re: Testing complex(?) CDI + EJB (+ ApplicationComposer) + JPA scenario brings up some questions

2013-04-10 Thread Romain Manni-Bucau
request and session scopes are active for a single thread (the test one) in unit test *Romain Manni-Bucau* *Twitter: @rmannibucau https://twitter.com/rmannibucau* *Blog: **http://rmannibucau.wordpress.com/*http://rmannibucau.wordpress.com/ *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*

Re: Testing complex(?) CDI + EJB (+ ApplicationComposer) + JPA scenario brings up some questions

2013-04-10 Thread Reinis Vicups
I guess, why is HeavyProcessingControllerProdu**cer session scoped? There is no HTTP Session when this unit test runs, so no it won't be active at that time. Ok but why then the same session scoped bean is able to read from JPA with no issues two method calls before? As you may notice in

Re: Testing complex(?) CDI + EJB (+ ApplicationComposer) + JPA scenario brings up some questions

2013-04-10 Thread John D. Ament
I would hope those interested in Application Composer also look at Arquillian for their automated testing needs (BTW: is your production target ENV just OpenEJB + OWB?) I think part of your issue is your use of @asynchronous. On Wed, Apr 10, 2013 at 3:28 PM, Reinis Vicups to...@orbit-x.de

Re: Testing complex(?) CDI + EJB (+ ApplicationComposer) + JPA scenario brings up some questions

2013-04-10 Thread Reinis Vicups
That is poopery, is there any alternative approach available (such as bootstrapping separate container in async worker merging entities back in and then persisting or just selecting different test-framework?) Would love to hear some good practice instead of chaotically trying different

Re: Testing complex(?) CDI + EJB (+ ApplicationComposer) + JPA scenario brings up some questions

2013-04-10 Thread Reinis Vicups
Thanks Mr. Ament for your input! Yes I think I will go with Arquillian, although Mr. Struberg is persisting (no pun) me to go with DeltaSpike. The Prod. Env. is ofcourse TomEE+ I think that fully built application will even run in prod. env. but I really want to test my app before

JSON serialization

2013-04-10 Thread Julien Eluard
Hi, when trying to send a List of POJOs (as application/json) via JAX-RS I get the infamous: WARNING: No message body writer has been found for response class List. Googling around I can find several suggestions to fix that (setting some Java properties, using Jackson, introducing an