会话管理 - Websphere 应用程序服务器
我有一个关于会话管理的问题。这是场景。
同一网络上有 3 组用户。有一个 J2EE 应用程序设置为在 60 分钟后结束用户会话。组是A、B 和C。现在A、B 和C 组都登录到J2EE 应用程序并开始使用它。 A 组用户可以正常使用该应用程序,没有任何问题。 B组和C组虽然被踢出的时间不同,但都是在规定的60分钟时间之前进行的。现在,A 组的用户访问 B 组的 PC。 B 组用户使用 AD 凭据登录到他们的 PC,然后 A 组用户登录到 J2EE 应用程序。一段时间后,在 60 分钟会话时间之前,A 组用户的会话提前结束。
还在我身边吗?我希望如此。
现在,B 组用户转到 A 组用户的 PC 并执行与上述相同的操作。 A 组用户使用 AD 凭据登录 PC,B 组用户登录 J2EE 应用程序。 B 组用户没有超时问题,并且不会在 60 分钟的会话结束设定时间之前被踢出。
哇!因此,J2EE 应用程序看起来并没有终止用户会话,因为 B 组用户在登录到 A 组用户 PC 时一切正常。
现在,有人能够解释这是如何发生的吗?我认为应用程序服务器(Websphere App Server 6.1)可能被配置为执行这样的操作,但我不是 websphere 管理员。
对于我可能尝试解决此问题的任何想法或建议,我们将不胜感激。另外,请提出任何问题,因为我知道我在解释所发生的事情时可能遗漏了一些内容。
谢谢!
I have a question about session management. Here's the scenario.
There are 3 groups of users on the same network. There is a J2EE application that is set to end a user's session after 60 minutes. The groups are A, B and C. Now Group A, B and C all log into the J2EE application and start using it. Group A users can use the application just fine with no issues. Group B and C though are kicked out are various times, but all before the set time of 60 minutes. Now a user from Group A goes to a Group B's PC. The Group B user logs into their PC with their AD credentials and then the Group A user logs into the J2EE application. After some time, well before the 60 minute session time, the Group A users' session is ended prematurely.
Still with me? I hope so.
Now the Group B user, goes to a Group A users' PC and does the same as above. The Group A user logs into their PC with their AD credentials and the Group B user logs into the J2EE application. The Group B user has no timeout issues and doesn't get kicked out before the 60 minute set time for the session to end.
Whew! So it doesn't look like the J2EE application is terminating the users' session, because the Group B users is fine when logged into a Group A users PC.
Now, would someone be able to explain how this could occur? I was thinking that the Application Server (Websphere App Server 6.1) might be configured to do such a thing, but I'm not a websphere administrator.
Any ideas or suggestions of what I may try to solve this issue would be greatly appreciated. Also, please ask any questions as I know that there may be some things that I have left out in my explanation of what is going on.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否在代码中设置 HttpSession.setMaxInactiveInterval(int secs) ?这会覆盖 WebSphere 中的任何其他设置。也许您正在设置一个随机值?
Are you setting HttpSession.setMaxInactiveInterval(int secs) in your code. This overrides any other settings in WebSphere. maybe you have a random value that is being set ?
除了尝试 Romain 提供的建议之外,还可以尝试这个。您可以打印 HTTPSession 的内容(及其属性)并查看值是什么。
使用 HTTPSessionListener,当会话被创建和销毁时,您将收到通知。
这会告诉您会话何时被破坏。
应用程序中的某些内容可能会触发它。
很难说可能出现什么问题,我们可以对这些方法进行初步尝试。
华泰
曼鲁
Besides trying the suggestion provided by Romain also try this. You can print the contents of HTTPSession (and its attributes) and see what the values are.
Use HTTPSessionListener and you would be notified when sessions are created and destroyed.
This would tell you when the sessions are getting destroyed.
It is likely that something in the application might be triggering it.
It is too difficult to say what are the possible problem and we can take a initial stab at these approaches.
HTH
Manglu