I've been meaning to ask this for a while. Does anyone see an issue with the following,
Thread.currentThread().getContextClassLoader().getResourceAsStream(CONFIG_FILE);
I use this input stream to load a properties file into a java.util.Properties object which works just fine.
What I'm unsure of is why Tomcat 6 has issue with this, I'm not holding onto the classloader reference so why does it give the warning...
SEVERE: The web application [/example] created a ThreadLocal with key of type [com.sun.xml.bind.v2.ClassFactory$1] (value [com.sun.xml.bind.v2.ClassFactory$1@4ae1da40]) and a value of type [java.util.WeakHashMap] (value [{class javax.xml.bind.annotation.W3CDomHandler=java.lang.ref.WeakReference@31bfc628}]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak. Jan 27, 2013 6:18:34 AM org.apache.catalina.startup.ExpandWar deleteDir
This isn't the biggest problem in the world as I do not hot redploy my application, however I would like to know if I'm doing something inappropriate.
Many Thanks,
J