Commit 6a872142 authored by Michi Mutsuzaki's avatar Michi Mutsuzaki
Browse files

ZOOKEEPER-1873. Unnecessarily InstanceNotFoundException is coming when...

ZOOKEEPER-1873. Unnecessarily InstanceNotFoundException is coming when unregister failed jmxbeans (Rakesh R via michim)


git-svn-id: https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.4@1567490 13f79535-47bb-0310-9956-ffa450edef68
parent 6ef87886
...@@ -241,6 +241,9 @@ BUGFIXES: ...@@ -241,6 +241,9 @@ BUGFIXES:
ZOOKEEPER-1811. The ZooKeeperSaslClient service name principal is ZOOKEEPER-1811. The ZooKeeperSaslClient service name principal is
hardcoded to "zookeeper" (Harsh J via phunt) hardcoded to "zookeeper" (Harsh J via phunt)
ZOOKEEPER-1873. Unnecessarily InstanceNotFoundException is coming when
unregister failed jmxbeans (Rakesh R via michim)
IMPROVEMENTS: IMPROVEMENTS:
ZOOKEEPER-1564. Allow JUnit test build with IBM Java ZOOKEEPER-1564. Allow JUnit test build with IBM Java
......
...@@ -89,13 +89,13 @@ public class MBeanRegistry { ...@@ -89,13 +89,13 @@ public class MBeanRegistry {
assert path != null; assert path != null;
} }
path = makeFullPath(path, parent); path = makeFullPath(path, parent);
mapBean2Path.put(bean, path);
mapName2Bean.put(bean.getName(), bean);
if(bean.isHidden()) if(bean.isHidden())
return; return;
ObjectName oname = makeObjectName(path, bean); ObjectName oname = makeObjectName(path, bean);
try { try {
mBeanServer.registerMBean(bean, oname); mBeanServer.registerMBean(bean, oname);
mapBean2Path.put(bean, path);
mapName2Bean.put(bean.getName(), bean);
} catch (JMException e) { } catch (JMException e) {
LOG.warn("Failed to register MBean " + bean.getName()); LOG.warn("Failed to register MBean " + bean.getName());
throw e; throw e;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment