This post originated from an RSS feed registered with Java Buzz
by Marc Logemann.
Original Post: ThreadDeath in Tomcat has arrived to me
Feed Title: Marc's Java Blog
Feed URL: http://www.logemann.org/day/index_java.xml
Feed Description: Java related topics for all major areas. So you will see J2ME, J2SE and J2EE issues here.
I am one of the guys using Tomcats Ant tasks heavily during development. Especially org.apache.catalina.ant.ReloadTask is used to quickly reload the webapp to reflect changes made to the app. In the last years, i had no problem with this, until today where the famous "ThreadDeath" Bug occurs.
See the bottom of this page to see why this bug is there. It seems that a fundamental LogFactory caching mechanism inside Commons-logging is causing the problems. But this LogFactory has its right to exist, so i dont know if and when there will be a solution to this.
To be honest, i never understood why there is a need for commons-logging at all. How often do you change a logging framework inside your application. If you wont do that too often or never, why to abstract logging at all? Normally i would say it doesnt matter if an API like that exists or not, but this kind of errors decrease your productivity, because you find yourself moving around your tomcat-logging.jar from one classloader place to another in some hope to fix it this way. At the end, it affects your work even when you dont use logging in your own apps. I am using Struts and this fact is enough to get that kind of problems with tomcat.
Comments like: "hot redeploying is error prone and its better not to use it" is somehow counterproductive. You wouldnt challenge the existance of the automobile, just because one specific tire is not the apropriate choice. I am excited when we can see a real solution there.