[appengine-java] Should JDO use be synchronized in threadsafe=true application?

2011-06-23 Thread David
Aaron (or others), Do you have any updates from your experiences using JDO with threadsafe enabled? Has your synchronization changes eliminated these errors? Is it necessary to synchronize reads such as query.execute and pm.detachCopyAll in additional to the write operations such as pm.deletePer

Re: Vs: Re: Vs: Re: Vs: Re: [appengine-java] Should JDO use be synchronized in threadsafe=true application?

2011-05-17 Thread Aaron Shepherd
Ok. My change to PMF.java to synchronize the get of the PersistenceManager did NOT correct the problem. Going to fallback to synchronizing every usage of the PersistenceManager (reads and writes). Will update this issue with any further results. On May 17, 1:54 am, Stephen Johnson wrote: > Ah,

Re: Vs: Re: Vs: Re: Vs: Re: [appengine-java] Should JDO use be synchronized in threadsafe=true application?

2011-05-16 Thread Stephen Johnson
Ah, I missed the point about it being tasks and didn't realize the threadsafe only applied to user requests and not tasks. If indeed that was the case. On Mon, May 16, 2011 at 10:44 PM, Juha K wrote: > The datanucleus issue has a comment "Then, when my tasks run in parallel, > initialisation ha

Vs: Re: Vs: Re: Vs: Re: [appengine-java] Should JDO use be synchronized in threadsafe=true application?

2011-05-16 Thread Juha K
The datanucleus issue has a comment "Then, when my tasks run in parallel, initialisation has already been done and the problem doesn't appear any more.", so before the threadsafe property, only tasks were run in parallel. Probably that's why I didn't see this error before, I didn't have tasks d

Re: Vs: Re: Vs: Re: [appengine-java] Should JDO use be synchronized in threadsafe=true application?

2011-05-16 Thread Stephen Johnson
Thinking out loud...What's strange about that issue (not this current one but the one from the past) and the supposed solution is that until just recently with the introduction of the threadsafe property supposedly only one request could executing at a time and you can't create your own additional

Vs: Re: Vs: Re: [appengine-java] Should JDO use be synchronized in threadsafe=true application?

2011-05-16 Thread Juha K
Based on your experience it seems to be that the problem is in the access to PersistenceManagerFactory.getPersistenceManager()? If your PMF-class fixes the problem, then it seems that call to getPersistenceManager() should be synchronized in multithreaded apps. Can anyone confirm this? I found

Re: Vs: Re: [appengine-java] Should JDO use be synchronized in threadsafe=true application?

2011-05-16 Thread Aaron Shepherd
I'm using this modified PMF class now and it seems to fix this problem, with the caveat that I haven't done any heavy load testing yet. public final class PMF { private static final PersistenceManagerFactory pmfInstance = JDOHelper.getPersistenceManagerFactory("transactions- option

Vs: Re: [appengine-java] Should JDO use be synchronized in threadsafe=true application?

2011-05-13 Thread Juha K
No, but I have single global instance of PersistenceManagerFactory, and from it I call getPersistenceManager() every time I need it. perjantaina 13. toukokuuta 2011 18.07.22 UTC+3 Ikai L (Google) kirjoitti: > > Do you just have a single global instance of persistence manager, or do you > use the

Re: [appengine-java] Should JDO use be synchronized in threadsafe=true application?

2011-05-13 Thread Ikai Lan (Google)
Do you just have a single global instance of persistence manager, or do you use the factory method? Ikai Lan Developer Programs Engineer, Google App Engine Blog: http://googleappengine.blogspot.com Twitter: http://twitter.com/app_engine Reddit: http://www.reddit.com/r/appengine On Thu, May 12,

[appengine-java] Should JDO use be synchronized in threadsafe=true application?

2011-05-12 Thread Juha K
I've been running an application successfully for some time on the app engine. During last week I've couple of times tried enabling threadsafe in my app. It seems to randomly cause issues with retrieving or storing data with JDO. What I see when I start to get these issues is this (I've replaced