Re: [appengine-java] Re: Trouble unit testing JPA data access objects.

2010-11-08 Thread Lucio Piccoli
hi didier i would like to see your unit test config and your spring config. can u post pls. thanks -lp On Fri, Nov 5, 2010 at 12:12 PM, Lucio Piccoli lucio.picc...@gmail.comwrote: hi didier, i did follow the google unit test doc. But my issue is using the spring tx with JPA in unit test.

Re: [appengine-java] Re: Trouble unit testing JPA data access objects.

2010-11-04 Thread lp
how did u get your unit tests to run in tx? i cant seem to get an active transaction. i followed all the links in this thread and more. any help appreciated -lp -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this

[appengine-java] Re: Trouble unit testing JPA data access objects.

2010-11-04 Thread Didier Durand
Hi Ip, do you correctly initiate your local env for the datastore: see http://code.google.com/appengine/docs/java/tools/localunittesting.html#Writing_Datastore_Tests You should then get an active transaction when needed. Let me know if needed: can provide you with my own code when needed

Re: [appengine-java] Re: Trouble unit testing JPA data access objects.

2010-11-04 Thread Lucio Piccoli
hi didier, i did follow the google unit test doc. But my issue is using the spring tx with JPA in unit test. ii cant seem to get my entity manager bound to a tx. if u have any ideas or spring config it would be most appreciated. thanks -lp On Thu, Nov 4, 2010 at 11:17 PM, Didier Durand

[appengine-java] Re: Trouble unit testing JPA data access objects.

2010-09-29 Thread Vikas Hazrati
I can understand the frustration. For GAE we have our transactions at the dao level unless we know that it can be at the service level. Since we are banking on the data becoming eventually consistent, we do not have transaction related problems right now. And, since they are at the dao level we do

Re: [appengine-java] Re: Trouble unit testing JPA data access objects.

2010-09-29 Thread David C. Hicks
I did discover that part of my problem was caused by my generic DAO class. I ditched the Crank stuff, and I'm writing my own. It seems to behave much better, and I did move my transaction annotations to the DAO. That's just going to be something I (we) have to get used to. Thanks for all

[appengine-java] Re: Trouble unit testing JPA data access objects.

2010-09-27 Thread Vikas Hazrati
Have you tried running the dao code in a transaction? Is your store and find happening in different transactions? Also you should take a note of Unlike with most databases, queries and gets inside a datastore transaction do not see the results of previous writes inside that transaction.

Re: [appengine-java] Re: Trouble unit testing JPA data access objects.

2010-09-27 Thread David C. Hicks
I am most accustomed to defining my transactions at the service level, so that multiple DAO might be involved in a single transaction. I do realize that the DataNucleus datastore has some peculiar behavior with regard to transactions. I'm still learning the ins and outs, though. My test