Update of /var/cvs/src/org/mmbase/cache
In directory james.mmbase.org:/tmp/cvs-serv15291/cache
Modified Files:
CacheManager.java
Log Message:
didnot' compile
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.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- CacheManager.java 18 Jul 2008 06:08:37 -0000 1.30
+++ CacheManager.java 18 Jul 2008 09:53:34 -0000 1.31
@@ -27,7 +27,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.30 2008/07/18 06:08:37 michiel Exp $
+ * @version $Id: CacheManager.java,v 1.31 2008/07/18 09:53:34 michiel Exp $
*/
public abstract class CacheManager {
@@ -96,9 +96,10 @@
* @param cache A cache.
* @return The previous cache of the same type (stored under the same name)
*/
- public static <K,V> Cache<K,V> putCache(Cache<K,V> cache) {
+ public static <K,V> Cache<K,V> putCache(Cache<K,V> cache, boolean mbean) {
Cache old = caches.put(cache.getName(), cache);
configure(configReader, cache.getName());
+ if (mbean) {
ObjectName name = getObjectName(cache);
try {
MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
@@ -106,8 +107,12 @@
} catch (JMException jmo) {
log.warn("" + name + " " + jmo.getClass() + " " +
jmo.getMessage());
}
+ }
return old;
}
+ public static <K,V> Cache<K,V> putCache(Cache<K,V> cache) {
+ return putCache(cache, true);
+ }
/**
* @since MMBase-1.9
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs