Examples of PojoCacheJmxWrapper


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

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

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

            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

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

   public void testPojoCacheJmxIntegration() throws Exception
   {
      log.debug("+++ testPojoCacheJmxIntegration()");
     
      mbeanServer = MBeanServerFactory.createMBeanServer("pojoCacheTest");
      PojoCacheJmxWrapper wrapper = null;
      try
      {
         // Register a cache
         wrapper = new PojoCacheJmxWrapper();
         // JBAS-4097 -- don't use a TransactionManagerLookup that will
         // bind DummyTransactionManager into JNDI, as that will screw
         // up other tests
         wrapper.setTransactionManagerLookupClass(MockTransactionManagerLookup.class.getName());
         wrapper.setCacheMode("REPL_SYNC");
         mbeanServer.registerMBean(wrapper, new ObjectName(CACHE_OBJECT_NAME));
         wrapper.create();
         wrapper.start();
        
         // Build up an SSO infrastructure based on LOCAL_ADDRESS        
         JBossCacheSSOClusterManager localSSOManager = new JBossCacheSSOClusterManager();
        
         MockSSOValve localValve = new MockSSOValve(mbeanServer);
         localValve.setCacheConfig(CACHE_OBJECT_NAME);
         localValve.setClusterManager(localSSOManager);
         localSSOManager.setSSOLocalManager(localValve);
         localSSOManager.start();
        
         // Create an SSO that will have two sessions from local valve
         localSSOManager.register("1", "FORM", "Brian", "password");
        
         Manager localSessMgr1 = getSessionManager("A");
         Session sess1 = new MockSession(localSessMgr1, "1");
         localSSOManager.addSession("1", getFullyQualifiedSessionId(sess1));
        
         Manager localSessMgr2 = getSessionManager("B");
         Session sess2 = new MockSession(localSessMgr2, "2");
         localSSOManager.addSession("1", getFullyQualifiedSessionId(sess2));
        
         // Confirm that data is cached properly
         assertEquals("SSO 1 has correct number of sessions", 2, localSSOManager.getSessionCount("1"));  
      }
      finally
      {
         try
         {
            if (wrapper != null)
            {
               wrapper.stop();
               wrapper.destroy();
            }
         }
         catch (Exception ignored)
         {           
         }
View Full Code Here

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

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

            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

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

            File configFile = tomcatConfig.getCacheConfigFile();
            String clusterName = tomcatConfig.getClusterName();
           
            if (configFile != null)
            {
               pcWrapper = new PojoCacheJmxWrapper(PojoCacheFactory.createCache(configFile.getAbsolutePath(), false));
                             
               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
                  pcWrapper.getPojoCache().getCache().getConfiguration().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

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

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

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
TOP
Copyright © 2018 www.massapi.com. 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.