MBean's CacheManager attribute ClusterSize does not reflect the cluster topology when
no cache is looked up
-----------------------------------------------------------------------------------------------------------
Key: ISPN-1044
URL:
https://issues.jboss.org/browse/ISPN-1044
Project: Infinispan
Issue Type: Bug
Components: JMX, reporting and management
Affects Versions: 5.0.0.BETA1
Reporter: Emmanuel Bernard
Assignee: Manik Surtani
{code}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" ) );
}
{code}
The code will only show 'Cluster size: 1' unless final Cache<Object,Object>
instances = manager.getCache( "INSTANCES" ); is uncommented
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira