Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-1044

MBean's CacheManager attribute ClusterSize does not reflect the cluster topology when no cache is looked up

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • None
    • 5.0.0.BETA1
    • None

    Description

      EmbeddedCacheManager manager = createCustomCacheManager( "default-config.xml", new Properties() );
      		manager.start();
      		MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
      		final String defaultDomain = mbs.getDefaultDomain();
      		ObjectName name = new ObjectName( "org.infinispan:type=CacheManager,name=\"HibernateOGM\",component=CacheManager" );
      
      		//uncomment to "fix" the bug and gat the right cluster size
      		//final Cache<Object,Object> instances = manager.getCache( "INSTANCES" );
      
      		for (;;) {
      			Thread.sleep( 5000 );
      			System.out.print( "\nCluster size: " + mbs.getAttribute( name, "ClusterSize" ) );
      		}
      

      The code will only show 'Cluster size: 1' unless final Cache<Object,Object> instances = manager.getCache( "INSTANCES" ); is uncommented

      Attachments

        Activity

          People

            manik_jira Manik Surtani (Inactive)
            rhn-engineering-ebernard Emmanuel Bernard
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: