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

should not download applet JNLP file on EventDispatchThread

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b01
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Backports

        Description

        browser window is not responsive during initial download of applet JNLP file; this is very noticeable especially when the jnlp file download is very slow due to network issues.

        Problem is the initial download of JNLP file happens in EDT:

        "AWT-EventQueue-3" prio=4 tid=0x0314ac00 nid=0xbe4 runnable [0x03acf000..0x03acfb60]
          java.lang.Thread.State: RUNNABLE
           at java.net.PlainSocketImpl.socketConnect(Native Method)
           at java.net.PlainSocketImpl.doConnect(Unknown Source)
           - locked <0x229bba00> (a java.net.SocksSocketImpl)
           at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
           at java.net.PlainSocketImpl.connect(Unknown Source)
           at java.net.SocksSocketImpl.connect(Unknown Source)
           at java.net.Socket.connect(Unknown Source)
           at sun.net.NetworkClient.doConnect(Unknown Source)
           at sun.net.www.http.HttpClient.openServer(Unknown Source)
           at sun.net.www.http.HttpClient.openServer(Unknown Source)
           - locked <0x229bb550> (a sun.net.www.http.HttpClient)
           at sun.net.www.http.HttpClient.&lt;init&gt;(Unknown Source)
           at sun.net.www.http.HttpClient.New(Unknown Source)
           at sun.net.www.http.HttpClient.New(Unknown Source)
           at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
           at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
           at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
           at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
           - locked <0x229b7e80> (a sun.net.www.protocol.http.HttpURLConnection)
           at com.sun.deploy.net.HttpUtils.followRedirects(Unknown Source)
           at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
           at com.sun.deploy.net.BasicHttpRequest.doGetRequestEX(Unknown Source)
           at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
           at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
           at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
           at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
           at com.sun.deploy.net.DownloadEngine.getCachedFile(Unknown Source)
           at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
           at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
           at sun.plugin2.applet.JNLP2Manager.initialize(JNLP2Manager.java:311)
           at sun.plugin2.main.client.PluginMain$StartAppletRunner.run(PluginMain.java:908)
           at java.awt.event.InvocationEvent.dispatch(Unknown Source)
           at java.awt.EventQueue.dispatchEvent(Unknown Source)
           at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
           at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
           at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
           at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
           at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
           at java.awt.EventDispatchThread.run(Unknown Source)

        Subsequent JAR download happens in a separate applet thread, so it's okay:

        "thread applet-SwingSet2Applet-1" prio=4 tid=0x02ad7800 nid=0x8b8 runnable [0x03f3f000..0x03f3fc60]
          java.lang.Thread.State: RUNNABLE
           at java.net.SocketInputStream.socketRead0(Native Method)
           at java.net.SocketInputStream.read(Unknown Source)
           at java.io.BufferedInputStream.fill(Unknown Source)
           at java.io.BufferedInputStream.read1(Unknown Source)
           at java.io.BufferedInputStream.read(Unknown Source)
           - locked <0x229b6ee0> (a java.io.BufferedInputStream)
           at sun.net.www.MeteredStream.read(Unknown Source)
           - locked <0x229d36f0> (a sun.net.www.http.KeepAliveStream)
           at java.io.FilterInputStream.read(Unknown Source)
           at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(Unknown Source)
           at java.io.BufferedInputStream.read1(Unknown Source)
           at java.io.BufferedInputStream.read(Unknown Source)
           - locked <0x229e46c8> (a java.io.BufferedInputStream)
           at java.io.BufferedInputStream.fill(Unknown Source)
           at java.io.BufferedInputStream.read1(Unknown Source)
           at java.io.BufferedInputStream.read(Unknown Source)
           - locked <0x229eefb8> (a java.io.BufferedInputStream)
           at java.io.FilterInputStream.read(Unknown Source)
           at java.io.PushbackInputStream.read(Unknown Source)
           at java.util.zip.InflaterInputStream.fill(Unknown Source)
           at java.util.zip.InflaterInputStream.read(Unknown Source)
           at java.util.zip.ZipInputStream.read(Unknown Source)
           at com.sun.deploy.net.HttpDownloadHelper.decompressWrite(Unknown Source)
           at com.sun.deploy.net.HttpDownloadHelper.download(Unknown Source)
           at com.sun.deploy.cache.Cache.downloadResourceToTempFile(Unknown Source)
           at com.sun.deploy.cache.Cache.downloadResourceToCache(Unknown Source)
           at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
           at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
           at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
           at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
           at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
           at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
           at com.sun.javaws.LaunchDownload.downloadJarFiles(Unknown Source)
           at com.sun.javaws.LaunchDownload.downloadEagerorAll(Unknown Source)
           at sun.plugin2.applet.JNLP2Manager.downloadResources(JNLP2Manager.java:1140)
           at sun.plugin2.applet.JNLP2Manager.prepareLaunchFile(JNLP2Manager.java:734)
           at sun.plugin2.applet.JNLP2Manager.loadJarFiles(JNLP2Manager.java:498)
           at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Plugin2Manager.java:1393)
           at java.lang.Thread.run(Unknown Source)

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                hdongorcl Hao Dong (Inactive)
                Reporter:
                ngthomas Thomas Ng (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: