Hello guys, I've got an app running for 1.3 months now, without any problem...
Until today, just before 3PM (GMT+2) my app stopped serving all queries from kind A. All the other kinds (B, C, D,...) still worked. When I looked it up in the logs, I found this error multiple times when querying kind A. 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. The problem is obvious you say? It would be, but I already use a Singleton. (And I searched my source files.. I never create more than one instance!) I'm using this code (it comes out of the JDO Google documentation): import javax.jdo.JDOHelper; import javax.jdo.PersistenceManagerFactory; public final class PMF { private static final PersistenceManagerFactory pmfInstance = JDOHelper.getPersistenceManagerFactory("transactions-optional"); private PMF() {} public static PersistenceManagerFactory get() { return pmfInstance; } } I did define my app as <threadsafe>true</threadsafe> so could I be a lucky lottery winner? Meaning that the pmfInstance was set twice on exactly the same moment? Should I put it in a synchronised block? Or should I use this code? public class PMF { private static final PersistenceManagerFactory pmfInstance = JDOHelper.getPersistenceManagerFactory("transactions-optional"); private PMF() {} public static PersistenceManagerFactory getInstance() { return pmfInstance; } } But, it does not explain why I only had problems while executing queries of kind A.. The other queries over other kinds still worked. Unfortunately, I discovered the problem 4 hours later and the problem was still accurate. Only disabling the app killed all running java instances and solved my problem. Any ideas what could have caused this? Thnx! Dimitri -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/IFrqYvT8U9gJ. 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.