You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Marc Saegesser <ma...@apropos.com> on 2000/11/14 02:20:44 UTC

[PATCH] 3.2b7 ContextManager.shutdown()

When Tomcat is shutdown not all contexts are shutdown.  This prevents the
destroy() method of servlets from being called.

The problem is the classic error of altering a collection during an
enumeration of that collection.  ContextManager.shutdown() gets an
enumeration of contextsV by calling ContextManager.getContexts() and then
calls ContextManager.removeContext() for each element.
ContextManager.removeContext() calls contextsV.removeElement() which
invalidates the enumeration in shutdown().

Attached is a patch that fixes the problem.