-
Enhancement
-
Resolution: Done
-
Trivial
-
5.0.0.CR2
-
Documentation (Ref Guide, User Guide, etc.), Compatibility/Configuration
-
Low
To use JGroups JChannel JMX monitoring, it's needed to register it to a MBeanServer.
Would it be possible to add a configuration key to be able to monitor the cache at a network level ?
Here's the actual JGroups documentation to activate JMX monitoring programmatically : http://community.jboss.org/wiki/JMX
I guess the correct place to implements the feature should be located in org.infinispan.remoting.transport.jgroups.JGroupsTransport::startJGroupsChannelIfNeeded()
and implementation could look like that :
protected void startJGroupsChannelIfNeeded() { if (startChannel) { try { channel.connect(configuration.getClusterName()); // my first contribution M Lachance ArrayList servers = MBeanServerFactory.findMBeanServer(null); if (servers == null || servers.size() == 0) { log.log(Logger.Level.WARN, "No Available MBean Servers"); //throw new Exception("No MBeanServers found;" + // "\nJmxTest needs to be run with an MBeanServer present, or inside JDK 5"); } else { MBeanServer server = (MBeanServer) servers.get(0); try { if (server != null) { JmxConfigurator.registerChannel((JChannel) channel, server, "JChannel=" + channel.getChannelName(), "", true); } } catch (Exception e) { log.log(Logger.Level.WARN, "Could not resgister with JMX",e); } } } catch (ChannelException e) { throw new CacheException("Unable to start JGroups Channel", e); } } address = new JGroupsAddress(channel.getAddress()); if (log.isInfoEnabled()) log.localAndPhysicalAddress(getAddress(), getPhysicalAddresses()); }
Thanks,
- blocks
-
ISPN-1134 New JMX MBeans documentation
- Closed