paulsp 2002/07/03 17:01:10
Modified: xdocs changes.xml
docs/site changes.html
src/java/org/apache/jetspeed/services/registry
RegistryWatcher.java CastorRegistryService.java
webapp/WEB-INF/conf JetspeedResources.properties
Log:
o Set Registry refresh default to 300 seconds, 5 minutes.
o Allow the registry refresh to be disabled.
o The Registry is refreshed after the initial load. This allows
registry entries that are dependent on entries defined later
iin the .xreg file to be loaded in the registry.
Revision Changes Path
1.42 +14 -1 jakarta-jetspeed/xdocs/changes.xml
Index: changes.xml
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/xdocs/changes.xml,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- changes.xml 30 Jun 2002 19:41:36 -0000 1.41
+++ changes.xml 4 Jul 2002 00:01:09 -0000 1.42
@@ -252,6 +252,19 @@
<li>
Add - 2002/06/30 - Basic security browser. (PS)
</li>
+<li>
+ Fix - 2002/07/01 - The customizer now displays the parameter value, not the
default value. (PS)
+</li>
+<li>
+ Fix - 2002/07/03 - Misc. fixes. (PS)
+ <ul>
+ <li>Set Registry refresh default to 300 seconds, 5 minutes.</li>
+ <li>Allow the registry refresh to be disabled.</li>
+ <li>The Registry is refreshed after the initial load. This allows
+ registry entries that are dependent on entries defined later
+ in the .xreg file to be loaded in the registry.</li>
+ </ul>
+</li>
</ul>
</section>
</body>
1.22 +11 -4 jakarta-jetspeed/docs/site/changes.html
Index: changes.html
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/docs/site/changes.html,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- changes.html 1 Jul 2002 18:09:10 -0000 1.21
+++ changes.html 4 Jul 2002 00:01:09 -0000 1.22
@@ -348,9 +348,6 @@
Add - 2002/05/09 - Added support for multiple template root directories - thanks
to Craig Setera (CK)
</li>
<li>
- Add - 2002/06/27 - New Security model merged (DT)
-</li>
-<li>
Add - 2002/06/29 - Security Ref for a "portlet set" can be set with the
Customizer (PS)
</li>
<li>
@@ -360,7 +357,17 @@
Add - 2002/06/30 - Basic security browser. (PS)
</li>
<li>
- Add - 2002/06/30 - Persistence Manager, Portlet Instances (DT)
+ Fix - 2002/07/01 - The customizer now displays the parameter value, not the
default value. (PS)
+</li>
+<li>
+ Fix - 2002/07/03 - Misc. fixes. (PS)
+ <ul>
+ <li>Set Registry refresh default to 300 seconds, 5 minutes.</li>
+ <li>Allow the registry refresh to be disabled.</li>
+ <li>The Registry is refreshed after the initial load. This allows
+ registry entries that are dependent on entries defined later
+ in the .xreg file to be loaded in the registry.</li>
+ </ul>
</li>
</ul>
</blockquote>
1.5 +11 -8
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.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- RegistryWatcher.java 30 Dec 2001 12:05:53 -0000 1.4
+++ RegistryWatcher.java 4 Jul 2002 00:01:09 -0000 1.5
@@ -72,7 +72,7 @@
{
/** Minimum scan rate for evaluating file refresh */
- public static final int SCAN_RATE = 60 * 1000;
+ public static final int SCAN_RATE = 60;
/**
The files monitored by this watcher
@@ -80,7 +80,7 @@
private Hashtable files = new Hashtable();
/**
- the refresh rate to use for monitoring this file
+ the refresh rate, in milliseconds, to use for monitoring this file
*/
private long refreshRate = 0;
@@ -158,17 +158,17 @@
}
/** Sets the refresh rate for this watcher
- * @param refresh the refresh rate in milliseconds
+ * @param refresh the refresh rate in seconds
*/
public void setRefreshRate(long refresh)
{
- this.refreshRate = ( refresh > SCAN_RATE ) ? refresh : SCAN_RATE;
+ this.refreshRate = (( refresh > SCAN_RATE ) ? refresh : SCAN_RATE) * 1000;
}
- /** @return the refresh rate of this watcher */
+ /** @return the refresh rate, in seconds, of this watcher */
public long getRefreshRate()
{
- return refreshRate;
+ return refreshRate / 1000;
}
/** Sets the file filter for selecting the registry files
@@ -269,6 +269,7 @@
{
while(!done)
{
+ Log.debug( "RegistryWatcher: Checking for updated files.");
Enumeration en = files.keys();
boolean needRefresh = false;
while(en.hasMoreElements())
@@ -349,8 +350,10 @@
/**
* Mark that the watching thread should be stopped
*/
- public void setDone() {
+ public void setDone()
+ {
done = true;
+ Log.info("RegistryWatcher: Watching thread stop requested");
}
}
1.17 +15 -3
jakarta-jetspeed/src/java/org/apache/jetspeed/services/registry/CastorRegistryService.java
Index: CastorRegistryService.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/registry/CastorRegistryService.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- CastorRegistryService.java 2 Apr 2002 21:59:58 -0000 1.16
+++ CastorRegistryService.java 4 Jul 2002 00:01:09 -0000 1.17
@@ -385,9 +385,17 @@
this.watcher = new RegistryWatcher();
this.watcher.setSubscriber(this);
this.watcher.setFilter(new ExtFileFilter(extension));
- this.watcher.setRefreshRate(refreshRate);
+ if (refreshRate == 0)
+ {
+ this.watcher.setDone();
+ }
+ else
+ {
+ this.watcher.setRefreshRate(refreshRate);
+ }
// changing the base will trigger a synchronous loading of the fragments
this.watcher.changeBase(base);
+
}
//Mark that we are done
@@ -411,7 +419,11 @@
refresh( name );
}
-
+
+ // Refresh the registry to make sure all <portlet-entry ... ref=""> are
loaded.
+ Log.info( "CasterRegistryService: Refreshing registry to insure entries are
loaded");
+ refresh();
+
//Mark that we are done
setInit(true);
1.81 +3 -2
jakarta-jetspeed/webapp/WEB-INF/conf/JetspeedResources.properties
Index: JetspeedResources.properties
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed/webapp/WEB-INF/conf/JetspeedResources.properties,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -r1.80 -r1.81
--- JetspeedResources.properties 1 Jul 2002 05:54:10 -0000 1.80
+++ JetspeedResources.properties 4 Jul 2002 00:01:10 -0000 1.81
@@ -331,7 +331,8 @@
services.Registry.default.Skin=local-skins
services.Registry.default.Security=local-security
services.Registry.extension=.xreg
-services.Registry.refreshRate=100
+# Refresh rate, in seconds. 0 = no refresh. Min value = 60
+services.Registry.refreshRate=300
#########################################
# PSMLManager Service #
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>