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 threads, so how could there have been a race condition before??

On Mon, May 16, 2011 at 10:16 PM, Juha K <[email protected]> wrote:

> 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 this issue:
> http://code.google.com/p/datanucleus-appengine/issues/detail?id=203(Unexpected
>  UnsupportedOperationException when calling getObjectById()) and
> used the workaround proposed there (doing a query in the start up). So far
> it seems to be working ok.
>
>
>
>
> lauantaina 14. toukokuuta 2011 8.26.02 UTC+3 Aaron Shepherd kirjoitti:
>>
>> 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-
>> optional");
>>
>>     private PMF()
>>     {
>>     }
>>
>>     public synchronized static PersistenceManagerFactory get()
>>     {
>>         return pmfInstance;
>>     }
>>
>>     public synchronized static PersistenceManager
>> getPersistenceManagerInstance()
>>     {
>>         return pmfInstance.getPersistenceManager();
>>     }
>> }
>>
>> Aaron Shepherd
>> OnFast.com
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to