Pregunta

It seems like I'm falling into a problematic scenario when combining JAX-WS architecture together with session management all that by using Applet client.

In order to maintain session I've added to the client's port the following property BindingProvider.SESSION_MAINTAIN_PROPERTY.

However, the thing is that when I invoke two instances of the applet (accessing the website on two tabs) simultaneously, the session gets mixed between the two clients. My suspicious is that this has to do with the fact that multiple applet instances use the same JVM instance and thus, static code is shared between them. However, I cannot figure out which part is being used in both instances.

I've positively verified that this issue of session mixture only occurs when running instances simultaneously from the same browser, i.e. when JVM static code is shared. In other words, the session management code works correctly in any other case that I've tested.

¿Fue útil?

Solución

..My suspicious is that this has to do with the fact that multiple applet instances use the same JVM instance ..

From a page on the Next Generation in Applet Java Plug-in Technology.

A New Way of Executing Applets

The new way of executing applets has architectural similarities to Java Web Start technology, but tighter browser integration. Applets no longer execute in a Java Virtual Machine (JVM) inside the web browser. Instead, a separate JVM machine process is launched to execute applets. By default, only one JVM machine is launched, but you have the opportunity to launch more than one JVM ...

(Emphasis mine)

Test your suspicions.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top