Update of /var/cvs/src/org/mmbase/util
In directory james.mmbase.org:/tmp/cvs-serv10354
Modified Files:
ResourceLoader.java
Log Message:
MMB-1666, depend on the fact that resoure is watched to reload the
configuration after servlet context is set
See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/util
See also: http://www.mmbase.org/jira/browse/MMB-1666
Index: ResourceLoader.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/util/ResourceLoader.java,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -b -r1.52 -r1.53
--- ResourceLoader.java 17 Dec 2007 11:36:05 -0000 1.52
+++ ResourceLoader.java 23 Jun 2008 12:44:50 -0000 1.53
@@ -97,7 +97,7 @@
* <p>For property-files, the java-unicode-escaping is undone on loading, and
applied on saving, so there is no need to think of that.</p>
* @author Michiel Meeuwissen
* @since MMBase-1.8
- * @version $Id: ResourceLoader.java,v 1.52 2007/12/17 11:36:05 michiel Exp $
+ * @version $Id: ResourceLoader.java,v 1.53 2008/06/23 12:44:50 michiel Exp $
*/
public class ResourceLoader extends ClassLoader {
@@ -223,6 +223,14 @@
// reset both roots, they will be redetermined using servletContext.
configRoot = null;
webRoot = null;
+ Set<ResourceWatcher> rws = ResourceWatcher.resourceWatchers;
+ if (rws != null) {
+ synchronized(rws) {
+ for (ResourceWatcher rw : rws) {
+ rw.onChange();
+ }
+ }
+ }
}
/**
@@ -1598,11 +1606,12 @@
Enumeration<URL> getResources(final String name) throws IOException {
try {
+ log.debug("Getting the resource " + name + " from " + this);
return
getClassLoader().getResources(getClassResourceName(name));
} catch (IOException ioe) {
throw ioe;
} catch (Throwable t) {
- log.warn(t);
+ log.warn("RAAS" + t.getMessage(), t);
return Collections.enumeration( Collections.EMPTY_LIST);
}
}
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs