remm        2005/02/15 08:19:21

  Modified:    catalina/src/share/org/apache/catalina/startup
                        HostConfig.java
  Log:
  - Handle similar cases for compressed WAR deployment and descriptor 
deployments.
  
  Revision  Changes    Path
  1.56      +12 -8     
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.55
  retrieving revision 1.56
  diff -u -r1.55 -r1.56
  --- HostConfig.java   15 Feb 2005 15:42:58 -0000      1.55
  +++ HostConfig.java   15 Feb 2005 16:19:21 -0000      1.56
  @@ -608,6 +608,8 @@
               // Add the eventual unpacked WAR and all the resources which 
will be
               // watched inside it
               if (isWar && unpackWARs) {
  +                deployedApp.redeployResources.put
  +                    (contextXml.getAbsolutePath(), new 
Long(contextXml.lastModified()));
                   
deployedApp.redeployResources.put(expandedDocBase.getAbsolutePath(),
                           new Long(expandedDocBase.lastModified()));
                   addWatchedResources(deployedApp, 
expandedDocBase.getAbsolutePath(), context);
  @@ -636,15 +638,15 @@
                               
deployedApp.redeployResources.put(warDocBase.getAbsolutePath(),
                                       new Long(warDocBase.lastModified()));
                           }
  +                        // Add the context XML to the list of files which 
should trigger a redeployment
  +                        deployedApp.redeployResources.put
  +                            (contextXml.getAbsolutePath(), new 
Long(contextXml.lastModified()));
                           if (expandedDocBase.exists()) {
                               
deployedApp.redeployResources.put(expandedDocBase.getAbsolutePath(),
                                       new 
Long(expandedDocBase.lastModified()));
                               addWatchedResources(deployedApp, 
                                       expandedDocBase.getAbsolutePath(), 
context);
                           }
  -                        // Add the context XML to the list of files which 
should trigger a redeployment
  -                        deployedApp.redeployResources.put
  -                            (contextXml.getAbsolutePath(), new 
Long(contextXml.lastModified()));
                       }
                   } else {
                       // Add the context XML to the list of files which should 
trigger a redeployment
  @@ -787,6 +789,11 @@
           // Deploy the application in this WAR file
           if(log.isInfoEnabled()) 
               log.info(sm.getString("hostConfig.deployJar", file));
  +
  +        // Populate redeploy resources with the WAR file
  +        deployedApp.redeployResources.put
  +            (dir.getAbsolutePath(), new Long(dir.lastModified()));
  +
           try {
               Context context = (Context) 
Class.forName(contextClass).newInstance();
               if (context instanceof Lifecycle) {
  @@ -799,7 +806,7 @@
               context.setDocBase(file);
               if (xml.exists()) {
                   context.setConfigFile(xml.getAbsolutePath());
  -                deployedApp.reloadResources.put
  +                deployedApp.redeployResources.put
                       (xml.getAbsolutePath(), new Long(xml.lastModified()));
               }
               host.addChild(context);
  @@ -831,9 +838,6 @@
               log.error(sm.getString("hostConfig.deployJar.error", file), t);
           }
           
  -        // Populate redeploy resources with the WAR file
  -        deployedApp.redeployResources.put
  -            (dir.getAbsolutePath(), new Long(dir.lastModified()));
           deployed.put(contextPath, deployedApp);
       }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to