title: Spring Tomcat permgen issue
body: <p>Hi I'm getting a permgen error on tomcat (and on glassfish) from my application, and i understand they are caused by the ClassLoader hanging on to references between hot-deploys.</p>
  
  <p>Id like to track down the memory leak but have not done it before, I think a good star would be fixing the following issues which tomcat spits out when i re-deploy:</p>
  
  <pre><code>SEVERE: The web application [] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
  06-Jan-2013 19:47:08 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
  SEVERE: The web application [] appears to have started a thread named [Resource Destroyer in BasicResourcePool.close()] but has failed to stop it. This is very likely to create a memory leak.
  </code></pre>
  
  <p>I guess i need to kill these threads inside some spring destroy handler, bud Im not sure how i would find the handles to destroy them?</p>
  
  <p>Cheers!
  NFV</p>