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

XMLWordPrintable

    • Type: Backport
    • Resolution: Fixed
    • Priority: P3
    • 7
    • Affects Version/s: None
    • Component/s: tools
    • b65
    • 6
    • b12
    • Verified

      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>.

            Assignee:
            Luis-Miguel Alventosa (Inactive)
            Reporter:
            Luis-Miguel Alventosa (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: