From: Mark C. <mcr...@ma...> - 2004-07-15 06:17:17
|
On Tue, 13 Jul 2004 08:58:07 -0700, Lane Sharman wrote: > Mark Crocker wrote: >> On Mon, 12 Jul 2004 13:02:55 -0400, Brian Goetz wrote: >>> Mark Crocker wrote: >>>> Tomcat 4.1.x seems to have a problem removing a web application that actively uses webmacro 1.1final. Auto deployment seems to be broken for related reasons. >>>> Is there a definitive fix or work-around for this problem or could someone supply a concrete example of how to use the ServletContextListener to shut down webmacro's background threads? >>> Is the webmacro.jar in the web app lib/ directory, or the server-wide >>> lib/ directory? >> The path is ${CATLINA_HOME}/webapps/${MY_APP}/WEB-INF/lib/webmacro.jar. > Can you identify which thread is running and not shutting down using a > debugger? Great idea! Thanks for the suggestion. Unfortunately, no, it doesn't seem to show any orphanned or zombie threads. If I install the webapp, I can see it create a new thread. Immediately stopping and removing it works just fine and removes both the new thread, the .war file and the corresponding expanded directory. Things are a little different if I actually run a servlet that uses webmacro before stopping and attempting to remove the servlet. Once run, webmacro does start up two threads, org.webmacro.util.TimeLoop$TimeLoopThread and org.webmacro.util.Clock$ClockThread. Simply stopping the webapp does kill the three corresponding threads as expected. However, the 'Remove' action in the tomcat manager removes everything EXCEPT for the webmacro.jar file in the WEB-INF/lib directory. When I try it in Windows 2000, the OS won't even let me manually delete the project directory or webmacro.jar file, complaining of a sharing violation, even though the application has been stopped. Re-installation also fails even though the tomcat manager claims that the second install succeeded. The only recourse at this point is to stop tomcat, manually delete the project directory containing the lone jar file and restart tomcat. I doubt this is simply a case of tomcat forgetting to close a resource for the webmacro.jar file because there are several other jars in that lib directory that get used and deleted just fine. Any other suggestions would be greatly appreciated. -- __ __ / /\ / /\/ / /_ ------------------------------------ / / \/ / /\ Mark Crocker / / /\ \ \/ / http://www.markcrocker.com/~mcrocker / / \_\/\ / ------------------------------------ /__/ /\ \ \_\/ \ \ \_\/ \ \ \ \__\/ |