ThreadLocal stores objects in the threads. If the key type of the ThreadLocal is a class that is specific to the webapp, then that class cannot be unloaded when the app is shutdown, unless the threads themselves are garbage-collected. By using HttpServletRequest as the key to the ThreadLocal, that should be avoided.