globalComponentRegistry.getComponent(CacheManagerJmxRegistration.class).start();
}
public void stop() {
// make sure we stop the default cache LAST!
Cache defaultCache = null;
for (Map.Entry<String, Cache> entry : caches.entrySet()) {
if (entry.getKey().equals(DEFAULT_CACHE_NAME)) {
defaultCache = entry.getValue();
} else {
unregisterCacheMBean(entry.getValue());
entry.getValue().stop();
}
}
if (defaultCache != null) {
unregisterCacheMBean(defaultCache);
defaultCache.stop();
}
globalComponentRegistry.getComponent(CacheManagerJmxRegistration.class).stop();
globalComponentRegistry.stop();
}