use of org.infinispan.jmx.CacheManagerJmxRegistration in project infinispan by infinispan.
the class ClusteredLockModuleLifecycle method registerClusteredLockManager.
private static void registerClusteredLockManager(BasicComponentRegistry registry, GlobalConfiguration globalConfig, ClusteredLockManagerConfiguration config) {
ClusteredLockManager clusteredLockManager = new EmbeddedClusteredLockManager(config);
registry.registerComponent(ClusteredLockManager.class, clusteredLockManager, true);
if (globalConfig.jmx().enabled()) {
try {
CacheManagerJmxRegistration jmxRegistration = registry.getComponent(CacheManagerJmxRegistration.class).running();
jmxRegistration.registerMBean(clusteredLockManager);
} catch (Exception e) {
throw log.jmxRegistrationFailed(e);
}
}
}
use of org.infinispan.jmx.CacheManagerJmxRegistration in project infinispan by infinispan.
the class CounterModuleLifecycle method registerCounterManager.
private static void registerCounterManager(EmbeddedCacheManager cacheManager, BasicComponentRegistry registry, GlobalConfiguration globalConfiguration) {
if (log.isTraceEnabled())
log.tracef("Registering counter manager.");
EmbeddedCounterManager counterManager = new EmbeddedCounterManager(cacheManager);
// This must happen before CacheManagerJmxRegistration starts
registry.registerComponent(CounterManager.class, counterManager, true);
if (globalConfiguration.jmx().enabled()) {
try {
CacheManagerJmxRegistration jmxRegistration = registry.getComponent(CacheManagerJmxRegistration.class).running();
jmxRegistration.registerMBean(counterManager);
} catch (Exception e) {
throw log.jmxRegistrationFailed(e);
}
}
}
Aggregations