Package org.infinispan.jmx

Examples of org.infinispan.jmx.CacheJmxRegistration


   public Object perform(InvocationContext ctx) throws Throwable {
      // To avoid reliance of a thread local flag, get a reference for the
      // cache store to be able to clear it after cache has stopped.
      CacheStore store = cacheLoaderManager.getCacheStore();
      Cache<Object, Object> cache = cacheManager.getCache(cacheName);
      CacheJmxRegistration jmx = cache.getAdvancedCache().getComponentRegistry().getComponent(CacheJmxRegistration.class);
      cache.stop();

      // After stopping the cache, clear it
      if (store != null)
         store.clear();

      // And see if we need to remove it from JMX
      if (jmx != null) {
         jmx.unregisterCacheMBean();
      }

      registry.removeCache(cacheName);
      return null;
   }
View Full Code Here


      // injection bootstrap stuff
      componentRegistry = new ComponentRegistry(cacheName, configuration, spi, globalComponentRegistry, reflectionCache);
      componentRegistry.registerDefaultClassLoader(defaultClassLoader);
      componentRegistry.registerComponent(spi, AdvancedCache.class);
      componentRegistry.registerComponent(new CacheJmxRegistration(), CacheJmxRegistration.class);
   }
View Full Code Here

         the component registry to look at the cache's @Inject methods, and construct various components and their
         dependencies, in turn.
         --------------------------------------------------------------------------------------------------------------
       */
      componentRegistry.registerComponent(cache, Cache.class.getName(), true);
      componentRegistry.registerComponent(new CacheJmxRegistration(), CacheJmxRegistration.class.getName(), true);
      if (configuration.transaction().transactionMode().isTransactional() && configuration.transaction().recovery().enabled()) {
         componentRegistry.registerComponent(new RecoveryAdminOperations(), RecoveryAdminOperations.class.getName(), true);
      }
      if (configuration.sites().hasEnabledBackups()) {
         componentRegistry.registerComponent(new XSiteAdminOperations(), XSiteAdminOperations.class.getName(), true);
View Full Code Here

      // injection bootstrap stuff
      componentRegistry = new ComponentRegistry(cacheName, configuration, spi, globalComponentRegistry);
      componentRegistry.registerDefaultClassLoader(defaultClassLoader);
      componentRegistry.registerComponent(spi, AdvancedCache.class);
      componentRegistry.registerComponent(new CacheJmxRegistration(), CacheJmxRegistration.class);
   }
View Full Code Here

         the component registry to look at the cache's @Inject methods, and construct various components and their
         dependencies, in turn.
         --------------------------------------------------------------------------------------------------------------
       */
      componentRegistry.registerComponent(cache, Cache.class.getName(), true);
      componentRegistry.registerComponent(new CacheJmxRegistration(), CacheJmxRegistration.class.getName(), true);
      if (configuration.transaction().transactionMode().isTransactional() && configuration.transaction().recovery().enabled()) {
         componentRegistry.registerComponent(new RecoveryAdminOperations(), RecoveryAdminOperations.class.getName(), true);
      }
      if (configuration.sites().hasEnabledBackups()) {
         componentRegistry.registerComponent(new XSiteAdminOperations(), XSiteAdminOperations.class.getName(), true);
View Full Code Here

      this.configuration = configuration;

      // injection bootstrap stuff
      componentRegistry = new ComponentRegistry(cacheName, configuration, spi, globalComponentRegistry, reflectionCache);
      componentRegistry.registerDefaultClassLoader(defaultClassLoader);
      componentRegistry.registerComponent(new CacheJmxRegistration(), CacheJmxRegistration.class);
   }
View Full Code Here

         the component registry to look at the cache's @Inject methods, and construct various components and their
         dependencies, in turn.
         --------------------------------------------------------------------------------------------------------------
       */
      componentRegistry.registerComponent(cache, Cache.class.getName(), true);
      componentRegistry.registerComponent(new CacheJmxRegistration(), CacheJmxRegistration.class.getName(), true);
      if (configuration.transaction().transactionMode().isTransactional() && configuration.transaction().recovery().enabled()) {
         componentRegistry.registerComponent(new RecoveryAdminOperations(), RecoveryAdminOperations.class.getName(), true);
      }
      if (configuration.sites().hasEnabledBackups()) {
         componentRegistry.registerComponent(new XSiteAdminOperations(), XSiteAdminOperations.class.getName(), true);
View Full Code Here

         the component registry to look at the cache's @Inject methods, and construct various components and their
         dependencies, in turn.
         --------------------------------------------------------------------------------------------------------------
       */
      componentRegistry.registerComponent(cache, Cache.class);
      componentRegistry.registerComponent(new CacheJmxRegistration(), CacheJmxRegistration.class);
      componentRegistry.registerComponent(new RecoveryAdminOperations(), RecoveryAdminOperations.class);
   }
View Full Code Here

      // injection bootstrap stuff
      componentRegistry = new ComponentRegistry(cacheName, configuration, spi, globalComponentRegistry);
      componentRegistry.registerDefaultClassLoader(defaultClassLoader);
      componentRegistry.registerComponent(spi, AdvancedCache.class);
      componentRegistry.registerComponent(new CacheJmxRegistration(), CacheJmxRegistration.class);
   }
View Full Code Here

         the component registry to look at the cache's @Inject methods, and construct various components and their
         dependencies, in turn.
         --------------------------------------------------------------------------------------------------------------
       */
      componentRegistry.registerComponent(cache, Cache.class);
      componentRegistry.registerComponent(new CacheJmxRegistration(), CacheJmxRegistration.class);
   }
View Full Code Here

TOP

Related Classes of org.infinispan.jmx.CacheJmxRegistration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.