[
http://jira.jboss.com/jira/browse/JGRP-627?page=comments#action_12388402 ]
Bela Ban commented on JGRP-627:
-------------------------------
You're right. I changed the default domain to "jgroups",
"jgroups:name=Multiplexer" is not a valid domain.
The 2 channels (below) are now actually registered with the MBeanServer in exactly the
same way as regular channels.
JChannel c1, c2;
JChannelFactory factory=new JChannelFactory();
factory.setMultiplexerConfig("stacks.xml");
c1=(JChannel)factory.createMultiplexerChannel("udp", "one");
c2=(JChannel)factory.createMultiplexerChannel("udp", "two");
c1.connect("x");
c2.connect("y");
factory.create();
MBeanServer server=MBeanServerFactory.findMBeanServer(null).get(0);
JmxConfigurator.registerChannel(c1, server, factory.getDomain(), "one",
true);
JmxConfigurator.registerChannel(c2, server, factory.getDomain(), "two",
true);
Util.sleep(60000);
Enabling JMX when using multiplexer.
------------------------------------
Key: JGRP-627
URL:
http://jira.jboss.com/jira/browse/JGRP-627
Project: JGroups
Issue Type: Bug
Affects Versions: 2.6
Reporter: Robert Newson
Assigned To: Bela Ban
Fix For: 2.7, 2.6.1
While debugging other issues (the disparity between cluster views and service views), I
attempted to add JMX support. However, having looked at the code, it turns out that
ObjectNames are formed incorrectly.
Caused by: javax.management.MalformedObjectNameException: Invalid character ':'
in value part of property
at javax.management.ObjectName.construct(ObjectName.java:602)
at javax.management.ObjectName.<init>(ObjectName.java:1394)
at org.jgroups.jmx.JmxConfigurator.registerChannel(JmxConfigurator.java:55)
at org.jgroups.jmx.JmxConfigurator.registerChannel(JmxConfigurator.java:41)
at org.jgroups.JChannelFactory.registerChannel(JChannelFactory.java:383)
at org.jgroups.JChannelFactory.createMultiplexerChannel(JChannelFactory.java:297)
at org.jgroups.JChannelFactory.createMultiplexerChannel(JChannelFactory.java:280)
It's attempting an ObjectName of the form
"jgroups:name=Multiplexer:type=channel,cluster=blah" which is illegal.
I enabled JMX by calling;
channelFactory.setExposeChannels(true);
channelFactory.create();
Am I doing this wrong or does the JMX registration simply not work?
I can work around this with;
channelFactory.setDomain("jgroups")
but this doesn't group the JMX beans in the way the code intends.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira