Skip to main content

Applets intermittently not sharing VM context in JRE 7u4+

4 replies [Last post]
dchavez
Offline
Joined: 2012-07-22
Points: 0

Hi,

We have an application that requires that multiple applets be able to communicate - ie. share a single VM instance (java.exe). This seems to work fine in JRE 6u32, but after installing JRE7u4+ this no longer works reliably, with multiple instances of Java.exe intermittently being created and as a result our applets are not able to communicate as required. This occurs even if we specify a java_version in our applet tags (1.6*) with the only workaround being to completely uninstall java 7. It also occurs whether we build against JDK6 or JDK7.

Has applet context sharing changed in Java 7 that would explain this behaviour? Any assistance with how we can resolve this issue would be greatly appreciated.

Thanks!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
dchavez
Offline
Joined: 2012-07-22
Points: 0

On the off-chance that anybody else stumbles into this issue, we have isolated the cause to the Xdebug runtime argument that we were passing into the JVM via the Java control panel! We were using the old method of enabling remote debugging, and switching to the new method "-agentlib:jdwp=..." has resolved our issue, with only a single java.exe being reliably spawned for our application. Strange that this was never an issue in Java 6uN...but either way I'm happy to have finally got to the bottom of the issue.

dchavez
Offline
Joined: 2012-07-22
Points: 0

To follow up again, we have noticed that in 7u5, after a random number of applets have been loaded (ie. in a FrameSet), a new JVM is instantiated, breaking our applet's ability to communicate via public static variables. I noticed that somebody else has submitted a bug on July 4 2012, describing this issue, as well as a reproducible sample. Just wanted to post here in case somebody felt able to investigate this issue, which is a show-stopper for our application!

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7181737

Thanks!

subi
Offline
Joined: 2012-10-29
Points: 0

Hi ,

Even we are facing the same issue.

We have a webpage that requires that two applets on the same page be able to communicate each other, to achieve this we are using getAppletContext() API . But accessing application using Firefox and JRE 7 getAppletContext().getApplet(appletName) is returning ‘NULL’ always and as a result our applets are not able to communicate as required. The webpage/applets are working fine with Internet Explorer.
So this issue can be specific to java plugin for Mozilla firefox.

Environment:
Firefox : 16.0.1
Java plug-in: Next Generation Java Plug-in 10.7.2 for Mozilla browsers.

Observations:
1. Multiple instances of Java.exe are getting created. ( is it the reason getAppletContext().getApplet(appletName) is returning NULL ?).
2. If we enable java console from control panel->java->advanced->java console->start console we are observing more than one java console.
3. This seems to work fine in JRE 6.

Any assistance with how we can resolve this issue would be greatly appreciated.

Thanks,
Subi

javahaxxor
Offline
Joined: 2013-05-06
Points: 0

For us the solution to the multiple spawning was to turn off the new generation plugin