Even if you use static ThreadLocal you can have a class loader leak when you redeploy your webapp if your value refer to some class loaded by the same class loader. It can happen if you use double brace initialization because that would create an anonymous class. I created a fix for that: github.com/codesinthedark/ImprovedThreadLocal
↧