From 0ef065ebc786df903ba2716283dccad771b37912 Mon Sep 17 00:00:00 2001 From: Amnon Heiman Date: Tue, 19 May 2015 17:46:34 +0300 Subject: [PATCH] JMX-API: Fix an endless loop in EndpointSnitchInfo This was a code that was modified from Origin, in the JMX API initilization is done in the custructor, which mean that it would enter an endless loop. When initiliation in the constructor this should be used. Signed-off-by: Amnon Heiman --- .../java/org/apache/cassandra/locator/EndpointSnitchInfo.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/apache/cassandra/locator/EndpointSnitchInfo.java b/src/main/java/org/apache/cassandra/locator/EndpointSnitchInfo.java index 5050feb..f6ef758 100644 --- a/src/main/java/org/apache/cassandra/locator/EndpointSnitchInfo.java +++ b/src/main/java/org/apache/cassandra/locator/EndpointSnitchInfo.java @@ -45,7 +45,7 @@ public class EndpointSnitchInfo implements EndpointSnitchInfoMBean { private EndpointSnitchInfo() { MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); try { - mbs.registerMBean(new EndpointSnitchInfo(), new ObjectName( + mbs.registerMBean(this, new ObjectName( "org.apache.cassandra.db:type=EndpointSnitchInfo")); } catch (Exception e) { throw new RuntimeException(e);