java什么是CacheManager的替代方法。集合名(字符串名)
当我们将Ehcache2.7.2升级到2.10.6时,我在cm.setName(cmName + "." + cm.hashCode());
处遇到编译时错误
公共HibernateCacheJmxRegister(JmxSupport JmxSupport)引发格式错误的ObjectNameException{
// Register the ehcache with JMX
for (Object obj : CacheManager.ALL_CACHE_MANAGERS) {
CacheManager cm = (CacheManager) obj;
String cmName = cm.getName();
if (cmName.startsWith("interact."))
continue; // Don't register caches
// If the cache manager is from a common ehcache configuration, then make the name
// unique by adding the hash code of the config manager.
if (cmName.startsWith("common.")) {
cm.setName(cmName + "." + cm.hashCode());
}
ManagementService.registerMBeans(
cm, jmxSupport.getPrimaryMBeanServer(), false, false, false, true);
}
}
你能给我提供其他的方法吗
共 (0) 个答案