JDK-6477345 : stop applet JAR download when we exit the applet page
  • Type: Enhancement
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 6
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows
  • CPU: x86
  • Submitted: 2006-10-02
  • Updated: 2010-04-04
  • Resolved: 2007-12-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7Resolved
Related Reports
Duplicate :  
Description
when we run an applet that requires downloading a large JAR file to start, if we switch to another page in the browser, the applet won't be loaded, but the JAR download will continue until it is done.

on unix, the JAR download will be stopped immediately.

we did try to interrupt the loader thread as soon as we back out of the page (via AppletPanel.stopLoading), just that it didn't stop the download as we expected.

Seems like this might be a limitation of our current implementation on windows.   We are trying to do a Thread.interrupt() on a thread which is doing InputStream.read() (downloading JAR), and on windows, this won't work, see bug:

4514257: Thread.interrupt() on InputStream.read() fails

On solaris, it works fine and you can see the downloading stop immediately.

There might be a way to workaround it on windows, using java.nio.channels.InterruptibleChannel.  See workaround section of bug 4329256: interrupted thread no longer produces output.

Comments
EVALUATION This has been fixed with 6399750 for 6u10 (consumer release)
11-12-2007

EVALUATION When a thread is interrupted, there is no guarantee than the I/O being processed will be interrupted automatically, and this is an expected behavior. If we want to do something different - interrupting the files being downloaded when the thread is interrupted, this has to be done explicitly in a programmatic way.
02-10-2006