It does not say in docs (yet, maybe an issue should be raised on this)
but Google's statement regarding destroy:

http://groups.google.com/group/google-appengine-java/browse_thread/thread/e18a454a1479b14a/b011dfa9a17c18c5

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.

Reply via email to