Reputation: 1925
I just migrated from JBoss EAP to WildFly and I am facing some issues with session sharing.
Previously in JBoss EAP, in my web.xml
I added the below configuration:
<session-config>
<cookie-config>
<path>/</path>
</cookie-config>
</session-config>
And both the applications were generating the same session id.
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.
How can I successfully share sessions in WildFly?
Upvotes: 3
Views: 2702
Reputation: 333
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>
Read this quide
https://docs.jboss.org/author/display/WFLY10/Web+(Undertow)+Reference+Guide
Upvotes: 1