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

JTop plugin fails if connected readonly to target JVM

    Details

    • Subcomponent:
    • Resolved In Build:
      b112
    • CPU:
      generic
    • OS:
      generic

      Description

      The JTop plugin includes this code:
          public void setMBeanServerConnection(MBeanServerConnection mbs) {
              this.server = mbs;
              try {
                  this.tmbean = newPlatformMXBeanProxy(server,
                                                       THREAD_MXBEAN_NAME,
                                                       ThreadMXBean.class);
              } catch (IOException e) {
                  e.printStackTrace();
              }
              if (!tmbean.isThreadCpuTimeSupported()) {
                  System.err.println("This VM does not support thread CPU time monitor
      ing");
              } else {
                  tmbean.setThreadCpuTimeEnabled(true);
              }
          }

      Notice the line tmbean This triggers bug 6696970 which causes JConsole to become unusable for the connection as a whole. If 6696970 is fixed then it might be reasonable to throw an exception (which JConsole will presumably display in a dialog window), but it would be better for JTop to catch the exception and operate in a degraded mode where it doesn't show CPU times (but does still show the list of threads).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                egahlin Erik Gahlin
                Reporter:
                emcmanus Eamonn McManus
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: