grails/grails-core — pull request #189 by andresteingress (2012-04-25 07:03:05+00:00)
Title: removed anonymous ThreadLocal subclasses (part of GRAILS-5823)

this patch removes the anonymous ThreadLocal subclass declarations in AbstractSavePersistentMethod and HibernatePersistenceContextInterceptor as discussed in http://jira.grails.org/browse/GRAILS-5823

Eclipse MAT shows that these anonymous ThreadLocal subclasses reference the WebappClassLoader class loader instance and keep hanging on application redeployment. As far as I understood the tomcat doc, the private static variables should be nullified in >= 7.0.6, but as far as our setup is concerned, this was not the case with our Grails 2.0.1 app running on 7.0.26.