使用 Applet 的 JAX-WS 客户端
当我通过使用 Applet 客户端将 JAX-WS 架构与会话管理结合在一起时,我似乎陷入了一个有问题的场景。
为了维护会话,我向客户端端口添加了以下属性 BindingProvider.SESSION_MAINTAIN_PROPERTY
。
然而,问题是,当我同时调用小程序的两个实例(在两个选项卡上访问网站)时,会话会在两个客户端之间混合。我怀疑这与多个 applet 实例使用同一个 JVM 实例,因此静态代码在它们之间共享这一事实有关。但是,我无法弄清楚这两个实例中都使用了哪个部分。
我已经证实,会话混合的问题仅在从同一个浏览器同时运行实例时发生,即共享 JVM 静态代码时。换句话说,会话管理代码在我测试过的任何其他情况下都可以正常工作。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
来自 下一代 Applet Java 插件技术。
(强调我的)
测试您的怀疑。
From a page on the Next Generation in Applet Java Plug-in Technology.
(Emphasis mine)
Test your suspicions.