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 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, 2011 at 1:47 AM, Juha K <juha.k...@gmail.com> wrote:
>
>> 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 
>> my apps class names with ---):
>> java.lang.UnsupportedOperationException
>> at 
>> org.datanucleus.store.appengine.EntityUtils.getPropertyName(EntityUtils.java:62)
>> at 
>> org.datanucleus.store.appengine.DatastoreFieldManager.storeObjectField(DatastoreFieldManager.java:839)
>>  at 
>> org.datanucleus.store.appengine.DatastoreFieldManager.storeStringField(DatastoreFieldManager.java:474)
>> at 
>> org.datanucleus.state.AbstractStateManager.providedStringField(AbstractStateManager.java:1023)
>>  at ---.jdoProvideField(VAJDO.java)
>> at ---.jdoProvideFields(VAJDO.java)
>> at 
>> org.datanucleus.state.JDOStateManagerImpl.provideFields(JDOStateManagerImpl.java:2715)
>>  at 
>> org.datanucleus.store.appengine.DatastorePersistenceHandler.insertPreProcess(DatastorePersistenceHandler.java:341)
>> at 
>> org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObjects(DatastorePersistenceHandler.java:251)
>>  at 
>> org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObject(DatastorePersistenceHandler.java:240)
>> at 
>> org.datanucleus.state.JDOStateManagerImpl.internalMakePersistent(JDOStateManagerImpl.java:3185)
>>  at 
>> org.datanucleus.state.JDOStateManagerImpl.makePersistent(JDOStateManagerImpl.java:3161)
>> at 
>> org.datanucleus.ObjectManagerImpl.persistObjectInternal(ObjectManagerImpl.java:1298)
>>  at 
>> org.datanucleus.ObjectManagerImpl.persistObject(ObjectManagerImpl.java:1175)
>> at 
>> org.datanucleus.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java:669)
>>  at 
>> org.datanucleus.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceManager.java:694)
>>
>> I've seen the same exception also when calling 
>> PersistenceManager.getObjectById(). The call to these methods comes directly 
>> from servlet requests.
>>
>> The error doesn't always happen, sometimes (especially for writes) when it 
>> starts to happen, it seems to happen to all writes. I've set threadsafe to 
>> false in my appengine-web.xml and the error goes away. But especially now 
>> knowing the upcoming change in the pricing, I'd like to be able to run my 
>> app multithreaded. My question is that is this a bug in the app engine, or 
>> should I be synchronizing JDO use in my app in order to run it with 
>> threadsafe=true?  
>>
>>
>>  -- 
>> 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-app...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> google-appengine...@googlegroups.com.
>> 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 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