Package org.jboss.cache.pojo.jmx

Examples of org.jboss.cache.pojo.jmx.PojoCacheJmxWrapper


         incrementPojoCacheCheckout(configName);
        
         if (registerCachesInJmx && mbeanServer != null)
         {
            String oName = getObjectName(getPojoCacheJmxAttributes(), configName);
            PojoCacheJmxWrapper wrapper = new PojoCacheJmxWrapper(cache);
            try
            {
               mbeanServer.registerMBean(wrapper, new ObjectName(oName));
            }
            catch (JMException e)
View Full Code Here


            File configFile = tomcatConfig.getCacheConfigFile();
            String clusterName = tomcatConfig.getClusterName();
           
            if (configFile != null)
            {
               pcWrapper = new PojoCacheJmxWrapper(PojoCacheFactory.createCache(configFile.getAbsolutePath(), false));
               Configuration config = pojoCache.getCache().getConfiguration();
                             
               if (clusterName != null)
               {
                  // Override the XML config with the name provided in
                  // server.xml.  Method setClusterName is specified in the
                  // Cluster interface, otherwise we would not do this
                  config.setClusterName(clusterName);
               }
            }
            else
            {
               // User did not try to configure the cache.
               // Configure it using defaults.  Only exception
               // is the clusterName, which user can specify in server.xml.
               Configuration config = new Configuration();
               String channelName = (clusterName == null) ? DEFAULT_CLUSTER_NAME
                                                          : clusterName;
               config.setClusterName(channelName);
               config.setIsolationLevel(DEFAULT_ISOLATION_LEVEL);
               config.setCacheMode(DEFAULT_CACHE_MODE);
               config.setLockAcquisitionTimeout(DEFAULT_LOCK_TIMEOUT);
               config.setTransactionManagerLookupClass(DEFAULT_TM_LOOKUP);
              
               pcWrapper = new PojoCacheJmxWrapper(PojoCacheFactory.createCache(config, false));
            }
           
            if (server != null && objName != null)
            {
               server.registerMBean(pcWrapper, objName);
View Full Code Here

TOP

Related Classes of org.jboss.cache.pojo.jmx.PojoCacheJmxWrapper

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.