Skip to content
Browse files

unregistering JMX

  • Loading branch information...
1 parent db360f5 commit 02116cf00ce67c25634eb22fe6e8e11ca6afa3a5 @belaban committed Dec 15, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 tests/perf/org/jgroups/tests/perf/MPerf.java
View
5 tests/perf/org/jgroups/tests/perf/MPerf.java
@@ -392,12 +392,15 @@ public void run() {
try {
JChannel ch=new JChannel(in);
Util.sleepRandom(1000, 5000);
- Util.close(channel);
+ channel.disconnect();
+ JChannel tmp=channel;
channel=ch;
channel.setName(name);
channel.setReceiver(MPerf.this);
channel.connect("mperf");
local_addr=channel.getAddress();
+ JmxConfigurator.unregisterChannel(tmp, Util.getMBeanServer(), "jgroups", "mperf");
+ Util.close(tmp);
JmxConfigurator.registerChannel(channel, Util.getMBeanServer(), "jgroups", "mperf", true);
}
catch(Exception e) {

0 comments on commit 02116cf

Please sign in to comment.
Something went wrong with that request. Please try again.