I found the answer to my questions:
Documentation on ServletContextListener: http://developer.java.sun.com/developer/technicalArticles/Servlets/servl etapi2.3/ In order to ge the servlet invoked, you need a <listener> tag, e.g., <listener> <listener-class>com.foo.ControllerServlet</listener-class> </listener> The appearance that I was not getting time to do my cleanup was due to a couple of things: 1) you need to be careful what you do since other threads, instances, etc. are in the process of disappearing. 2) For some reason my shutdown methods (both contextDestroyed() and destroy()) were being called twice. I think they were not completing operation on the second call. Adding a static variable to ignore the second call seems to have fixed things. -- Frank
