> OK. > > I have a webapp deployed with the main package under WEB-INF/classes and all > dependent libraries under WEB-INF/lib as .jars. > > If I recompile my application, update the necessary classes in WEB-INF/classes, > Tomcat does manage to reload the app but my application is now totally hosed. > > The reason is that Tomcat didn't just reload the changed classes but it reloaded > everything including the all classes under WEB-INF/ > > Is there anyway I can tell Tomcat to JUST reload the changed classes and not > the whole webapp?
No. A class loader can only load one class once (you can't have it forget a class that has been loaded before). > The problem is that any singletons I have (which depended on correct > initialization) are now broken and I have lost all state. > > I remember talking to Craig about ClassLoaders a while back and he mentioned > that the JVM has now way for a ClassLoader to unload a class so they have to > start out with a new ClassLoader. > > Is there any way around this? No. Of course, there's a reason for this, as a selective reloading would be a very complex thing to do. Remy -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>