Index: JGroups/src/org/jgroups/jmx/JmxConfigurator.java =================================================================== RCS file: /cvsroot/javagroups/JGroups/src/org/jgroups/jmx/JmxConfigurator.java,v retrieving revision 1.18 diff -u -r1.18 JmxConfigurator.java --- JGroups/src/org/jgroups/jmx/JmxConfigurator.java 5 Apr 2010 15:24:56 -0000 1.18 +++ JGroups/src/org/jgroups/jmx/JmxConfigurator.java 25 Jun 2010 14:40:44 -0000 @@ -47,7 +47,9 @@ ProtocolStack stack = channel.getProtocolStack(); Vector protocols = stack.getProtocols(); for (Protocol p : protocols) { - register(p, server, getProtocolRegistrationName(cluster_name, domain, p)); + if (p.getClass().isAnnotationPresent(MBean.class)) { + register(p, server, getProtocolRegistrationName(cluster_name, domain, p)); + } } } register(channel, server, getChannelRegistrationName(channel, domain, cluster_name)); @@ -80,7 +82,7 @@ server.unregisterMBean(new ObjectName(name)); } - public static void unregisterChannel(JChannel c, MBeanServer server, String clusterName) + public static void unregisterChannel(JChannel c, MBeanServer server, String domain, String clusterName) throws Exception { ProtocolStack stack = c.getProtocolStack(); @@ -88,7 +90,7 @@ for (Protocol p : protocols) { if (p.getClass().isAnnotationPresent(MBean.class)) { try { - unregister(p, server, getProtocolRegistrationName(clusterName, "jgroups", p)); + unregister(p, server, getProtocolRegistrationName(clusterName, domain, p)); } catch (MBeanRegistrationException e) { if (log.isWarnEnabled()) { log.warn("MBean unregistration failed " + e); @@ -96,7 +98,7 @@ } } } - unregister(c, server, getChannelRegistrationName(clusterName)); + unregister(c, server, getChannelRegistrationName(c, domain, clusterName)); } public static void registerChannelFactory(JChannelFactory factory, MBeanServer server,