在WildFly上的会话共享无法正常工作 [英] Session sharing on WildFly is not working
问题描述
我刚刚从JBoss EAP迁移到WildFly,并且在会话共享方面遇到了一些问题.
I just migrated from JBoss EAP to WildFly and I am facing some issues with session sharing.
以前,在JBoss EAP中,我在web.xml
中添加了以下配置:
Previously in JBoss EAP, in my web.xml
I added the below configuration:
<session-config>
<cookie-config>
<path>/</path>
</cookie-config>
</session-config>
两个应用程序都生成相同的会话ID.
And both the applications were generating the same session id.
但是在WildFly中,问题是,应用程序1将在路径/
中编写会话,例如123
,如果我打开应用程序2,它将覆盖会话,例如456
.现在,如果我刷新应用程序1,它将再次覆盖会话,并且该过程将继续重复.
But in WildFly the problem is, application 1 will write session as for example 123
in the path /
, and if I open application 2 it will override the session as say 456
. Now if I refresh application 1 it will again override the session and the process keeps on repeating.
如何在WildFly中成功共享会话?
How can I successfully share sessions in WildFly?
推荐答案
添加jboss-all.xml
add jboss-all.xml
<jboss umlns="urn:jboss:1.0">
<shared-session-config xmlns="urn:jboss:shared-session-config:1.0">
<session-config>
<cookie-config>
<path>/</path>
</cookie-config>
</session-config>
</shared-session-config>
</jboss>
阅读这部短篇小说
https://docs.jboss.org/author /display/WFLY10/Web +(Undertow)+ Reference + Guide
这篇关于在WildFly上的会话共享无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!