cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reinh...@apache.org
Subject svn commit: r514113 - /cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-webapp-wrapper/src/main/java/org/apache/cocoon/servlet/CocoonReloadingListener.java
Date Sat, 03 Mar 2007 10:10:57 GMT
Author: reinhard
Date: Sat Mar  3 02:10:56 2007
New Revision: 514113

URL: http://svn.apache.org/viewvc?view=rev&rev=514113
Log:
reload whenever any sitemap changes. This is necessary in order to avoid
classnotfound exceptions when a sitemap changes. Don't know why this happens
but this, although it's slowing down development a bit (~2.5 sec reload time), 
is the best solution for now

Modified:
    cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-webapp-wrapper/src/main/java/org/apache/cocoon/servlet/CocoonReloadingListener.java

Modified: cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-webapp-wrapper/src/main/java/org/apache/cocoon/servlet/CocoonReloadingListener.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-webapp-wrapper/src/main/java/org/apache/cocoon/servlet/CocoonReloadingListener.java?view=diff&rev=514113&r1=514112&r2=514113
==============================================================================
--- cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-webapp-wrapper/src/main/java/org/apache/cocoon/servlet/CocoonReloadingListener.java
(original)
+++ cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-webapp-wrapper/src/main/java/org/apache/cocoon/servlet/CocoonReloadingListener.java
Sat Mar  3 02:10:56 2007
@@ -34,10 +34,14 @@
 
     public void onChangeFile(File changedFile) {
         super.onChangeFile(changedFile);
-        String changedFileParent = changedFile.getParent().replace('\\', '/');
+        String changedFileParentPath = changedFile.getParent().replace('\\', '/');
+        String changedFilePath = changedFile.getAbsolutePath().replace('\\', '/');      
 
 
-        if (changedFileParent.endsWith("META-INF/cocoon/spring") || changedFileParent.endsWith("config/avalon")
-                || changedFileParent.endsWith("config/spring")) {
+        if(changedFileParentPath.endsWith("META-INF/cocoon/spring") ||
+                changedFileParentPath.endsWith("config/avalon") ||
+                changedFilePath.endsWith(".xmap") ||
+                changedFilePath.endsWith(".xmap.xml") ||
+                changedFileParentPath.endsWith("config/spring")) {            
             log.info("File change detected: " + changedFile);
             reload = true;
         }



Mime
View raw message