Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6538179

REGRESSION: JConsole connects to wrong MBean Server with URL service:jmx:rmi://localhost/jndi/...

    XMLWordPrintable

Details

    • b65
    • 6
    • b02
    • generic
    • generic

    Backports

      Description

        Create an RMI server using code like the following:
                MBeanServer server = ManagementFactory.getPlatformMBeanServer();
                LocateRegistry.createRegistry(9589);
                JMXServiceURL addr = new JMXServiceURL("rmi", null, 0, "/jndi/rmi://localhost:9589/jmx");
                RMIConnectorServer cs = new RMIConnectorServer(addr, env);
                ObjectName name = new ObjectName("connector:type=cserver,name=mycserver");
                server.registerMBean(cs, name);
                cs.start();

        Then run jconsole using a URL like this:
            jconsole service:jmx:rmi://localhost/jndi/rmi://localhost:9589/jmx

        The MBean Server you see is not the one created above.

        This is a regression, because JConsole from JDK 5.0 does the right thing. The bug is in JConsole, because if you create a connection programmatically using the same URL it works correctly.

        This problem was reported on the SDN JMX forum by Robin Merckx and Erik Vaneylen; see <http://forum.java.sun.com/thread.jspa?messageID=9569129>.

        Attachments

          Issue Links

            Activity

              People

                lmalvent Luis-Miguel Alventosa (Inactive)
                emcmanus Eamonn McManus
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: