Re: AW: AW: Shutdown hook for correctly unloading drivers

2010-03-29 Thread Mark Thomas
On 29/03/2010 10:19, Steffen Heil wrote: > Hi > >>> I am thinking about a strategy to iterate over all running threads and >>> interrupt (and if absolutely necessary stop) all threads started by a >>> certain classloader (not sure if it is possible, but I suspect so - > might >>> require instrumen

AW: AW: Shutdown hook for correctly unloading drivers

2010-03-29 Thread Steffen Heil
Hi > > I am thinking about a strategy to iterate over all running threads and > > interrupt (and if absolutely necessary stop) all threads started by a > > certain classloader (not sure if it is possible, but I suspect so - might > > require instrumention though.) > Tomcat can already do this. Gr

Re: AW: Shutdown hook for correctly unloading drivers

2010-03-28 Thread Mark Thomas
On 28/03/2010 19:46, Steffen Heil wrote: > Hi > > You wrote, that when an application is unloaded, that tomcat discards all > references to the classes of that web application, therefore the garbage > collector could effectively "unload" that application. > > However, there are web applications t

AW: Shutdown hook for correctly unloading drivers

2010-03-28 Thread Steffen Heil
il [mailto:li...@steffen-heil.de] > Subject: AW: Shutdown hook for correctly unloading drivers > > This does not hold, as soon as Threads are involved, right? I don't understand your comment; Thread objects always exist, and what do you think that has to do with unloading classes? -

AW: Shutdown hook for correctly unloading drivers

2010-03-28 Thread Steffen Heil
Hi > > How does tomcat unload classes? > It doesn't, at least not directly. Tomcat simply eliminates all references to the classes; the actual unloading is done by GC at some point in the future. > > Is there even a way in java to do this? > Just the above. But making the classes unreachable sh

AW: Shutdown hook for correctly unloading drivers

2010-03-26 Thread Steffen Heil
Hi > > I would like to know, if there is a shutdown-hook for Tomcat > > available. Or what the prefered way is, to correctly unload drivers > > like JDBC drivers. > Tomcat has unloaded the driver. That won't be causing your memory leak. How does tomcat unload classes? Some (especially some pool