When Legacy Applet Life cycle is enabled with the HTML attribute , the applets destroy method is never gets called. Destroy is called only with the Plug-ins life cycle or Normal applet lifecycle.destroy method should be called when browser exit or close , This works fine on windows platform.
To reproduce the problem:
1. Install Java Plug-in 1.4.1 build 14
2. Load the following applet :
http://sqesvr.sfbay.sun.com/deployment2/sridhare/shutdown/LegacySequence_plugin.html
3. After the Plugin and applet is loaded , close the browser or exit the browser from the file menu of the browser.
4. Look at the Java Plug-in trace file located at USER_HOME/.plugn141.trace file.
5.The applet is not using any GUI components except the system.out in all the applet methods.
To Check the normal life cycle without Lifecycle attribute is true.run the following applet.
http://sqesvr.sfbay.sun.com/deployment2/sridhare/shutdown/NormalSequence_plugin.html
Here is the output in the trace file with legacy life cycle true and browser is closed after applet is loaded:
==================================================================================
Java(TM) Plug-in: Version 1.4.1
Using JRE version 1.4.1-beta Java HotSpot(TM) Client VM
User home directory = /home/sridhare
Proxy Configuration: Manual Configuration
Proxy: http=scaweb1:8080,https=scaweb1:8080,ftp=scaweb1:8080,gopher=scaweb1:8080
Proxy Overrides:
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
p: reload proxy configuration
q: hide console
r: reload policy configuration
s: dump system properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------
Init called
Start called
Stop called
~
Plug-in trace file Normal Life Cycle with no legacy life cyle attribute
========================================================================
ava(TM) Plug-in: Version 1.4.1
Using JRE version 1.4.1-beta Java HotSpot(TM) Client VM
User home directory = /home/sridhare
Proxy Configuration: Manual Configuration
Proxy: http=scaweb1:8080,https=scaweb1:8080,ftp=scaweb1:8080,gopher=scaweb1:8080
Proxy Overrides:
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
p: reload proxy configuration
q: hide console
r: reload policy configuration
s: dump system properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------
Init called
Start called
Stop called
destroy called
~
~
To reproduce the problem:
1. Install Java Plug-in 1.4.1 build 14
2. Load the following applet :
http://sqesvr.sfbay.sun.com/deployment2/sridhare/shutdown/LegacySequence_plugin.html
3. After the Plugin and applet is loaded , close the browser or exit the browser from the file menu of the browser.
4. Look at the Java Plug-in trace file located at USER_HOME/.plugn141.trace file.
5.The applet is not using any GUI components except the system.out in all the applet methods.
To Check the normal life cycle without Lifecycle attribute is true.run the following applet.
http://sqesvr.sfbay.sun.com/deployment2/sridhare/shutdown/NormalSequence_plugin.html
Here is the output in the trace file with legacy life cycle true and browser is closed after applet is loaded:
==================================================================================
Java(TM) Plug-in: Version 1.4.1
Using JRE version 1.4.1-beta Java HotSpot(TM) Client VM
User home directory = /home/sridhare
Proxy Configuration: Manual Configuration
Proxy: http=scaweb1:8080,https=scaweb1:8080,ftp=scaweb1:8080,gopher=scaweb1:8080
Proxy Overrides:
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
p: reload proxy configuration
q: hide console
r: reload policy configuration
s: dump system properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------
Init called
Start called
Stop called
~
Plug-in trace file Normal Life Cycle with no legacy life cyle attribute
========================================================================
ava(TM) Plug-in: Version 1.4.1
Using JRE version 1.4.1-beta Java HotSpot(TM) Client VM
User home directory = /home/sridhare
Proxy Configuration: Manual Configuration
Proxy: http=scaweb1:8080,https=scaweb1:8080,ftp=scaweb1:8080,gopher=scaweb1:8080
Proxy Overrides:
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
p: reload proxy configuration
q: hide console
r: reload policy configuration
s: dump system properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------
Init called
Start called
Stop called
destroy called
~
~