No, you can't share a PMF instance between app instances. Constructing this is slow because it has to do classpath scanning. Note that if you use the low-level API, application startup time is greatly reduced:
http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/package-summary.html -- Ikai Lan Developer Programs Engineer, Google App Engine Blogger: http://googleappengine.blogspot.com Reddit: http://www.reddit.com/r/appengine Twitter: http://twitter.com/app_engine On Tue, Oct 26, 2010 at 3:32 AM, Ian Marshall <ianmarshall...@gmail.com>wrote: > As we all know, the construction of a PersistenceManagerFactory (PMF) > instance that is needed for exchanging data with the datastore is > slow. > > To speed up the showing of my home page (which does not need data from > the datastore), my application creates a queued task at launch-time, > which constructs its singleton PMF instance asynchronously. This way, > the creation of my PMF does not add to spin-up (and other?) delays to > app start-up. > > Can a PMF instance be shared between application instances? > > If so, I could hasten app initialisation by getting an already- > existing PMF instance from the memory cache and only construct one if > it is no longer in the memory cache. > > -- > 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-j...@googlegroups.com. > To unsubscribe from this group, send email to > google-appengine-java+unsubscr...@googlegroups.com<google-appengine-java%2bunsubscr...@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-j...@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.