I'm using url-classloader in my webapp. In general, there is class A:
on ServletContextListener.init() A.init() is called, and on ServletContextListener.destroy() A.destroy() is called.
Objects created by that classloader are used in TimerTasks (no references to TimerTasks are stored). Before calling A.destroy(), I'm calling .cancel() on Timer, that invokes those TimerTasks.
The problem is: on webapp unloading Tomcat erases all but jars, that has been used, when creating classloader in createClassLoader() method, therefore Tomcat can not fully unsinstall or redeploy that webapp.
How can I unload objects and classes loaded by my classLoader? Is this problem somehow related to Timer, that I'm using for working with that objects? [ October 22, 2006: Message edited by: Askar Kalykov ]