-
Bug
-
Resolution: Won't Fix
-
P3
-
None
-
6u22
-
x86
-
windows_xp
FULL PRODUCT VERSION :
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
The plugin developer guide section of the current Java SE Documentation states:
"Beginning with JDK 1.4, two new methods have been added to interface
java.Applet.AppletContext to allow applet persistence across browser sessions."
- AppletContext.setStream
- AppletContext.getStream
It appears that this functionality stopped working in the next-generation java-plugin. The new plugin has the ability to stop and start an attached JVM. When a JVM is stopped, all date stored with the Applet Persistence API is lost.
This is a regression bug.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Preparations: two simple Applets using the same Codebase. One applet should store data using the Applet Persistence API and the other applet should read that data (and write it to the java console for example..).
1. Store data using the setStream-Method of the Applet Persistence API
2. Wait about one minute until the JVM is stopped by the java plugin (the java icon disappears from the windows system tray and the java console window is closed).
3. Read data using the getStream-Method.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The data which was stored using setStream is returned.
This happens when you do NOT wait in step 2 or when you use the classic plugin.
ACTUAL -
No data is returned.
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
This is a regression bug. It worked fine including Java 6 Update 07.
Test case has been provided -
The applet on applet1.html stores a value using the applet persistence api.
The console output would be:
getPersistentProperty: Property Key 'mkey' not found.
setPersistentProperty: 'mkey' => 'sval2'.
getPersistentProperty: Property Key 'mkey' has the value: 'sval2'.
If reload this applet the property remains stored and the expected output on the console is:
getPersistentProperty: Property Key 'mkey' has the value: 'sval2'.
setPersistentProperty: 'mkey' => 'sval2'.
getPersistentProperty: Property Key 'mkey' has the value: 'sval2'.
If use the next-generation java-plugin the plugin might terminate the jvm.
This usually
happens if close the browser tab with applet1.html and
wait for about 60 seconds.
If the Java Console window disappears that means that the jvm is terminated.
If open a browser with applet1.html again the console output would be:
getPersistentProperty: Property Key 'mkey' not found.
setPersistentProperty: 'mkey' => 'sval2'.
getPersistentProperty: Property Key 'mkey' has the value: 'sval2'.
This means that the data stored with the plugin persistence api is lost.
Even if the browser session is still active!
It seems this error is new to Java 6 N because the ability for the plugin to
stop and start the jvm
was new to the next-generation java-plugin. someone forgot to modify the applet persistence api
accordingly.
Reviewed with Roger, OK to defer for 7.
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
The plugin developer guide section of the current Java SE Documentation states:
"Beginning with JDK 1.4, two new methods have been added to interface
java.Applet.AppletContext to allow applet persistence across browser sessions."
- AppletContext.setStream
- AppletContext.getStream
It appears that this functionality stopped working in the next-generation java-plugin. The new plugin has the ability to stop and start an attached JVM. When a JVM is stopped, all date stored with the Applet Persistence API is lost.
This is a regression bug.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Preparations: two simple Applets using the same Codebase. One applet should store data using the Applet Persistence API and the other applet should read that data (and write it to the java console for example..).
1. Store data using the setStream-Method of the Applet Persistence API
2. Wait about one minute until the JVM is stopped by the java plugin (the java icon disappears from the windows system tray and the java console window is closed).
3. Read data using the getStream-Method.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The data which was stored using setStream is returned.
This happens when you do NOT wait in step 2 or when you use the classic plugin.
ACTUAL -
No data is returned.
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
This is a regression bug. It worked fine including Java 6 Update 07.
Test case has been provided -
The applet on applet1.html stores a value using the applet persistence api.
The console output would be:
getPersistentProperty: Property Key 'mkey' not found.
setPersistentProperty: 'mkey' => 'sval2'.
getPersistentProperty: Property Key 'mkey' has the value: 'sval2'.
If reload this applet the property remains stored and the expected output on the console is:
getPersistentProperty: Property Key 'mkey' has the value: 'sval2'.
setPersistentProperty: 'mkey' => 'sval2'.
getPersistentProperty: Property Key 'mkey' has the value: 'sval2'.
If use the next-generation java-plugin the plugin might terminate the jvm.
This usually
happens if close the browser tab with applet1.html and
wait for about 60 seconds.
If the Java Console window disappears that means that the jvm is terminated.
If open a browser with applet1.html again the console output would be:
getPersistentProperty: Property Key 'mkey' not found.
setPersistentProperty: 'mkey' => 'sval2'.
getPersistentProperty: Property Key 'mkey' has the value: 'sval2'.
This means that the data stored with the plugin persistence api is lost.
Even if the browser session is still active!
It seems this error is new to Java 6 N because the ability for the plugin to
stop and start the jvm
was new to the next-generation java-plugin. someone forgot to modify the applet persistence api
accordingly.
Reviewed with Roger, OK to defer for 7.
- duplicates
-
JDK-6994444 Applet Persistence API is broken in the next-generation plugin
- Closed