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 google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to