[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-3497?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Zili Chen updated ZOOKEEPER-3497:
---------------------------------
    Description: 
{{org.apache.zookeeper.jmx.MBeanRegistry}} is an effective singleton while its 
constructor isn't private. We could make it a standard singleton.


  was:
{{org.apache.zookeeper.jmx.MBeanRegistry}} is an effective singleton while its 
constructor isn't private. We could make it a standard singleton.

public MBeanRegistry () {
    try {
        mBeanServer = ManagementFactory.getPlatformMBeanServer(); 
    } catch (Error e) {
        // Account for running within IKVM and create a new MBeanServer
        // if the PlatformMBeanServer does not exist.
        mBeanServer = MBeanServerFactory.createMBeanServer();
    }
}


> Make org.apache.zookeeper.jmx.MBeanRegistry a standard singleton
> ----------------------------------------------------------------
>
>                 Key: ZOOKEEPER-3497
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3497
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: jmx
>    Affects Versions: 3.6.0
>            Reporter: jwhao
>            Priority: Minor
>
> {{org.apache.zookeeper.jmx.MBeanRegistry}} is an effective singleton while 
> its constructor isn't private. We could make it a standard singleton.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to