Another context.xml tracking issue. This time if using just dir deployment.
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 1 Apr 2011 01:02:07 +0000 (01:02 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 1 Apr 2011 01:02:07 +0000 (01:02 +0000)
A changes in context.xml now triggers a redeploy rather than a reload (so the context.xml is re-read)

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1087534 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/startup/HostConfig.java

index 87beb13..758d63a 100644 (file)
@@ -1055,10 +1055,16 @@ public class HostConfig
             host.addChild(context);
             deployedApp.redeployResources.put(dir.getAbsolutePath(),
                     Long.valueOf(dir.lastModified()));
-            if (xmlCopy != null) {
-                deployedApp.redeployResources.put(
-                        xmlCopy.getAbsolutePath(),
-                        Long.valueOf(xmlCopy.lastModified()));
+            if (deployXML && xml.exists()) {
+                if (xmlCopy == null) {
+                    deployedApp.redeployResources.put(
+                            xml.getAbsolutePath(),
+                            Long.valueOf(xml.lastModified()));
+                } else {
+                    deployedApp.redeployResources.put(
+                            xmlCopy.getAbsolutePath(),
+                            Long.valueOf(xmlCopy.lastModified()));
+                }
             }
             addWatchedResources(deployedApp, dir.getAbsolutePath(), context);
         } catch (Throwable t) {