struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From musa...@apache.org
Subject svn commit: r794094 - /struts/struts2/trunk/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingXMLWebApplicationContext.java
Date Tue, 14 Jul 2009 22:24:56 GMT
Author: musachy
Date: Tue Jul 14 22:24:56 2009
New Revision: 794094

URL: http://svn.apache.org/viewvc?rev=794094&view=rev
Log:
add some logging to class reloading

Modified:
    struts/struts2/trunk/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingXMLWebApplicationContext.java

Modified: struts/struts2/trunk/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingXMLWebApplicationContext.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingXMLWebApplicationContext.java?rev=794094&r1=794093&r2=794094&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingXMLWebApplicationContext.java
(original)
+++ struts/struts2/trunk/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingXMLWebApplicationContext.java
Tue Jul 14 22:24:56 2009
@@ -178,16 +178,22 @@
     }
 
     public void onDirectoryCreate(File file) {
-        if (classLoader != null)
+        if (classLoader != null) {
+            if (LOG.isDebugEnabled())
+                LOG.debug("Change detected in file [#0], reloading class loader", file.getAbsolutePath());
             classLoader.reload();
+        }
     }
 
     public void onDirectoryDelete(File file) {
     }
 
     public void onFileChange(File file) {
-        if (classLoader != null)
+        if (classLoader != null) {
+            if (LOG.isDebugEnabled())
+                LOG.debug("Change detected in file [#0], reloading class loader", file.getAbsolutePath());
             classLoader.reload();
+        }
     }
 
     public void onFileCreate(File file) {



Mime
View raw message