-
Bug
-
Resolution: Fixed
-
P2
-
6u10
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2200495 | 7-pool | Unassigned | P4 | Closed | Cannot Reproduce | |
JDK-2183218 | 6u23 | Hao Dong | P3 | Closed | Duplicate | |
JDK-2186672 | 6u19 | Karunakar Gajjala | P2 | Resolved | Fixed | b01 |
JDK-2189224 | 6u18-rev | Karunakar Gajjala | P2 | Resolved | Fixed | b09 |
JDK-2178273 | 5.0-pool | Karunakar Gajjala | P3 | Closed | Not an Issue | |
JDK-2178274 | 1.4.2 | Karunakar Gajjala | P3 | Closed | Not an Issue |
There is a difference in behavior between different jdk6 update release
in applet.destroy() is called when browser is closed.
With 6u7, destroy() can run into completion, whereas with 6u10,
destory() is interrupted before the it is finished.
This could post a problem for cleaning up resources.
Steps to run the testcase (attached)
--------------------------
a. Copy the files to the document root of a web server.
b. Compile TestApplet.java
c. Load test.html on a browser.
d. Open the java console
After the applet is loaded, close the browser. When jre 6u7 is used, the
java console will have the following output :
Inside init
Inside start
Inside stop
Inside destroy
Before waitObj wait
After waitObj wait
Exiting destroy
When jre 6u10 is used, java console shows the following output :
Inside init
Inside start
Inside stop
Inside destroy
Before waitObj wait
java.lang.InterruptedException
at java.lang.Object.wait(Native Method)
at TestApplet.destroy(TestApplet.java:30)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown
Source)
at java.lang.Thread.run(Unknown Source)
Exiting destroy
I read through the document at
http://java.sun.com/developer/technicalArticles/javase/java6u10/
and the release notes at https://jdk6.dev.java.net/plugin2/
There is a note that says
"Improved applet lifecycle management. Calls to the applet lifecycle methods
init, start, stop, and destroy are more deterministic and cross-browser
behavior has been improved. "
But there is no specific information on what changes developers should expect
and code accordingly.
We have tested the disable of the "next-generation java plugin" already with the provided testcase and it did not solve the problem.
import java.applet.*;
public class TestApplet extends Applet {
public void init()
{
System.out.println("Inside init");
}
public void start()
{
System.out.println("Inside start");
}
public void stop()
{
System.out.println("Inside stop");
}
public void destroy()
{
System.out.println("Inside destroy");
Object waitObj = new Object();
try
{
synchronized(waitObj)
{
System.out.println("Before waitObj wait");
waitObj.wait(2*60*1000);
System.out.println("After waitObj wait");
}
}
catch(Exception e)
{
e.printStackTrace();
}
System.out.println("Exiting destroy");
}
}
<HTML>
<HEAD></HEAD>
<BODY >
<OBJECT classid="clsid:CAFEEFAC-0016-0000-0010-ABCDEFFEDCBA"
codebase="http://java.sun.com/products/plugin/autodl/jinstall-1_6_0-wind
ows-i586.cab#Version=1,6,0,10"
WIDTH="750"
HEIGHT="600"
HSPACE="0"
VSPACE="0"
ID="">
<PARAM NAME="TYPE" VALUE="application/x-java-applet;jpi-version=1.6.0_10">
<PARAM NAME="CODEBASE" VALUE=".">
<PARAM NAME="CODE" VALUE="TestApplet" >
<COMMENT>
<EMBED SRC="" PLUGINSPAGE="http://java.sun.com/products/archive/j2se/6.0_10/inde
x.html"
TYPE="application/x-java-applet"
java_codebase="."
java_code="TestApplet"
WIDTH="750"
HEIGHT="600"
HSPACE="0"
VSPACE="0"
NAME=""
>
<NOEMBED>
</COMMENT>
</NOEMBED></EMBED>
</OBJECT>
</BODY>
</HTML>
- backported by
-
JDK-2186672 Regression: applet.destroy() is interrupted with jdk 6u10, run into completion with 6u7
- Resolved
-
JDK-2189224 Regression: applet.destroy() is interrupted with jdk 6u10, run into completion with 6u7
- Resolved
-
JDK-2178273 Regression: applet.destroy() is interrupted with jdk 6u10, run into completion with 6u7
- Closed
-
JDK-2178274 Regression: applet.destroy() is interrupted with jdk 6u10, run into completion with 6u7
- Closed
-
JDK-2183218 Regression: applet.destroy() is interrupted with jdk 6u10, run into completion with 6u7
- Closed
-
JDK-2200495 Regression: applet.destroy() is interrupted with jdk 6u10, run into completion with 6u7
- Closed