Update of /var/cvs/src/org/mmbase/cache
In directory james.mmbase.org:/tmp/cvs-serv10928
Modified Files:
Tag: MMBase-1_8
CacheManager.java
Log Message:
made a bit more robust
See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/cache
Index: CacheManager.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/cache/CacheManager.java,v
retrieving revision 1.6.2.2
retrieving revision 1.6.2.3
diff -u -b -r1.6.2.2 -r1.6.2.3
--- CacheManager.java 19 Mar 2008 15:38:04 -0000 1.6.2.2
+++ CacheManager.java 28 Jul 2008 15:06:54 -0000 1.6.2.3
@@ -25,7 +25,7 @@
* Cache manager manages the static methods of [EMAIL PROTECTED] Cache}. If
you prefer you can call them on this in stead.
*
* @since MMBase-1.8
- * @version $Id: CacheManager.java,v 1.6.2.2 2008/03/19 15:38:04 michiel Exp $
+ * @version $Id: CacheManager.java,v 1.6.2.3 2008/07/28 15:06:54 michiel Exp $
*/
public class CacheManager {
@@ -72,7 +72,11 @@
*/
protected static Cache putCache(Cache cache) {
Cache old = (Cache) caches.put(cache.getName(), cache);
+ try {
configure(configReader, cache.getName());
+ } catch (Throwable t) {
+ log.error(t.getMessage(), t);
+ }
return old;
}
@@ -135,6 +139,8 @@
log.service("Setting " + cacheName + " " + status + " with
size " + size);
} catch (NumberFormatException nfe) {
log.error("Could not configure cache " + cacheName + "
because the size was wrong: " + nfe.toString());
+ } catch (Throwable t) {
+ log.error(" " + cacheName + " maxsize " + t.getMessage());
}
String maxSize =
xmlReader.getElementValue(xmlReader.getElementByPath(cacheElement,
"cache.maxEntrySize"));
if (!"".equals(maxSize)) {
@@ -143,6 +149,8 @@
log.service("Setting maximum entry size on " +
cacheName + ": " + cache.maxEntrySize + " bytes ");
} catch (NumberFormatException nfe2) {
log.error("Could not set max entry size cache of " +
cacheName + " because " + nfe2.toString());
+ } catch (Throwable t) {
+ log.error(" " + cacheName + " maxentrysize " +
t.getMessage());
}
} else {
if (cache.getDefaultMaxEntrySize() > 0) {
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs