You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by pa...@apache.org on 2001/12/30 13:05:53 UTC
cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/services/registry RegistryWatcher.java
paulsp 01/12/30 04:05:53
Modified: src/java/org/apache/jetspeed/services/registry
RegistryWatcher.java
Log:
o Fixed but #5626 (Registry entries being reloaded too often). The
Root cause: Modification time of the directory was not being
updated.
o Expaned import, i.e. import java.io.* to import java.io.File.
PR: 5626
Revision Changes Path
1.4 +8 -5 jakarta-jetspeed/src/java/org/apache/jetspeed/services/registry/RegistryWatcher.java
Index: RegistryWatcher.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/registry/RegistryWatcher.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- RegistryWatcher.java 9 Jun 2001 15:37:34 -0000 1.3
+++ RegistryWatcher.java 30 Dec 2001 12:05:53 -0000 1.4
@@ -55,9 +55,10 @@
package org.apache.jetspeed.services.registry;
import org.apache.turbine.util.Log;
-import java.io.*;
-import java.net.*;
-import java.util.*;
+import java.io.File;
+import java.io.FileFilter;
+import java.util.Enumeration;
+import java.util.Hashtable;
/**
@@ -65,7 +66,7 @@
* of file updates.
*
* @author <a href="mailto:raphael@apache.org">Rapha�l Luta</a>
- * @version $Id: RegistryWatcher.java,v 1.3 2001/06/09 15:37:34 raphael Exp $
+ * @version $Id: RegistryWatcher.java,v 1.4 2001/12/30 12:05:53 paulsp Exp $
*/
public class RegistryWatcher extends Thread
{
@@ -285,6 +286,7 @@
{
if (f.lastModified() > modified)
{
+ files.put(f,new Long(f.lastModified()));
if (f.isDirectory())
{
File[] contents = null;
@@ -312,9 +314,10 @@
}
else
{
- files.put(f,new Long(f.lastModified()));
subscriber.loadFragment(f.getCanonicalPath());
}
+ Log.debug("RegistryWatcher: Refreshing because "
+ + f.getCanonicalPath() + " was modified.");
needRefresh = true;
}
}
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>