Actually there is an issue already "destroy() is never called by the servlet container" http://code.google.com/p/googleappengine/issues/detail?id=2164 so just star it to get the docs fixed.
On May 27, 8:08 am, dmitrygusev <[email protected]> wrote: > Hi, I wrote a simple servlet to count application instances GAE > allocates to serve my application. Here is the code: > > public class ApplicationInstancesCounterServlet extends HttpServlet { > > private static MemcacheService memcacheService; > > @Override > public void init() throws ServletException { > super.init(); > > memcacheService = MemcacheServiceFactory.getMemcacheService(); > > memcacheService.increment(ApplicationInstancesCounterServlet.class.getName( ), > 1L, 0L); > } > > @Override > public void destroy() { > > memcacheService.increment(ApplicationInstancesCounterServlet.class.getName( ), > -1L, 0L); > > super.destroy(); > } > > } > > But what I see after ~12 hours is value 222. > > Which, I think, number of application starts (new instance created > every 3 minutes), but seems the destroy method never called. > > Can I know somehow that app instance is shutting down? -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
