Search code examples
javatomcatclassloader

Synchronizing webapps across servers


Unfortunately due to an "inflexible" IT policy in a large organization I work in, the sysadmins synchronize the webapps folder of a Tomcat instance between a Dev and Prod machine, using RSync without restarting either instance. So, jars, class files, everything gets copied over whilst the server is running. Crazy in my opinion.

Occasionally however I find bugs that have been recently fixed suddenly reappear intermittently. My feeling is this may be due to stale class files being held by the JVM on the production machine, but this is a difficult thing to determine. Do people think this is a likely scenario?

Thanks

Will


Solution

  • That sounds very likely to me. If JSPs are involved, it sounds even more likely. If your IT people are that inflexible, perhaps you could at least convince them to wipe the generated-file directories when they do their rsync (the classes, and possibly source, generated from JSPs into Servlets). I've certainly seen Tomcat hang onto stale generated files even when Tomcat HAS been restarted after a build.