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

JConsole JavaScript plugin demo should not execute JavaScript from the EDT

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 6
    • 6
    • client-libs
    • b95
    • generic
    • generic

      Mustang includes a potentially very useful demo of jconsole plugins and JavaScript. A new tab is added to jconsole using its plugin API. You can type JavaScript code into that tab and have it executed. Users can build simple monitoring functionality based on this.

      The problem is that the JavaScript code typed into the new tab, as well as the code executed from $HOME/jconsole.js, is executed inside Swing's Event Dispatch Thread. This means that the jconsole GUI is completely frozen while it executes. For example, if you type this:
          for (i = 0; i < 1000000; i++) ;
      into the JavaScript tab, then the jconsole window will completely lock up until the loop completes. If you iconify and uniconify it, it will be an empty grey square until the loop completes. If you have the misfortune to execute an infinite loop, then (at least on Solaris) you will not even be able to exit jconsole by clicking on its window's close button.

            sundar Sundararajan Athijegannathan
            emcmanus Eamonn McManus
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: