remm 2003/06/10 13:15:35 Modified: catalina/src/share/org/apache/catalina/startup HostConfig.java Log: - Small deployer refactorings, as discussed previsouly. - Add extra check for the case where the WAR is deployed by an "outside" process such as the manager. Revision Changes Path 1.12 +14 -11 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/HostConfig.java Index: HostConfig.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/HostConfig.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- HostConfig.java 10 Jun 2003 20:01:31 -0000 1.11 +++ HostConfig.java 10 Jun 2003 20:15:35 -0000 1.12 @@ -715,20 +715,23 @@ int period = expandedDir.lastIndexOf("."); if (period >= 0) expandedDir = expandedDir.substring(0, period); + File expanded = new File(appBase, expandedDir); String contextPath = "/" + expandedDir; if (contextPath.equals("/ROOT")) contextPath = ""; - try { - ((Deployer) host).remove(contextPath, true); - deployed.remove(files[i]); - } catch (Throwable t) { - log.error(sm.getString("hostConfig.undeployJar.error", - files[i]), t); + if (dir.lastModified() > expanded.lastModified()) { + try { + ((Deployer) host).remove(contextPath, true); + deployed.remove(files[i]); + } catch (Throwable t) { + log.error(sm.getString("hostConfig.undeployJar.error", + files[i]), t); + } + deployApps(); } webXmlLastModified.remove(contextPath); warLastModified.put (files[i], new Long(dir.lastModified())); - deployApps(); } } }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]