[concurrency-interest] Final field set null on threadtermination

David Holmes davidcholmes at aapt.net.au
Sat Oct 2 05:16:43 EDT 2010


Tim Eck writes:
> > The application is a webapp deployed in tomcat. Whenever the context is
> > reloaded all the logging threads are shutdown.
>
> I wonder if tomcat's reference clearing stuff is the cause of this?
>
> Setting
> -Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=fal
> se would be a quick test to see if it stops the NullPointerException.

Wow! That's nasty. You don't want to do that without also fully
understanding the thread lifecycles involved. Ouch! I can understand the
need to workaround past GC/retention issues, but I would have thought that
defaulting to false would have been much more prudent.

David Holmes

> For source minded:
> http://svn.apache.org/repos/asf/tomcat/tc6.0.x/tags/TOMCAT_6_0_29/java/org
> /apache/catalina/loader/WebappClassLoader.java
>
>
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
> http://cs.oswego.edu/mailman/listinfo/concurrency-interest
>



More information about the Concurrency-interest mailing list