I'm getting this error:
SEVERE: The web application [/app] appears to have started a thread named [ImmediateThread-1469817702874] but has failed to stop it. This is very likely to create a memory leak.
I am using Jersey for this and I believe it creates the ImmediateThread
and basically, I have no control over this. Is there any way where I can just access all ThreadLocal
objects and remove them on contextDestroyed()
?
I understand that this can be ignored if we just basically restart the Tomcat server but I would love to have the privilege to just undeploy and deploy apps without worrying about possible memory leaks.
I'm using Java 7, Tomcat 7, Jersey, Hibernate.