Sometimes people use a custom class in threadLocal value without even realizing that. For example it can happen when you use double brace initialization for your thread local value because double brace initialization will create an anonymous class. I created a fix for thread local that fix that class loader leak for your web apps but preserve non-blocking access to the thread local values: github.com/codesinthedark/ImprovedThreadLocal Now you can use your classes in ThreadLocal and you will not have memory leak on webapp redeployment
↧