Make sure you're using a PMF singleton as described here: http://code.google.com/appengine/docs/java/datastore/usingjdo.html#Getting_a_PersistenceManager_Instance
Then you can call PMF.get().getPersistenceManager in all of your classes instead of continually instantiating new PersistenceManagerFactory objects, which is an expensive operation. - Jason On Wed, Sep 23, 2009 at 5:27 PM, Vatsa <vats...@gmail.com> wrote: > > Hi, > I am a newbie to "Google App Engine". We are trying to prototype a > simple application to persist DTO which are read from a .csv file to > the virtual data store. > > I get the following error (very descriptive) at the time of > instantiating the Access Manager > > Caused by: javax.jdo.JDOFatalUserException: Application code attempted > to create a PersistenceManagerFactory named transactions-optional, but > one with this name already exists! Instances of > PersistenceManagerFactory are extremely slow to create and it is > usually not necessary to create one with a given name more than once. > Instead, create a singleton and share it throughout your code. If you > really do need to create a duplicate PersistenceManagerFactory (such > as for a unittest suite), set the > appengine.orm.disable.duplicate.pmf.exception system property to avoid > this error. > > > Thanks > Vatsa > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---