Are you using the shared session functionality? Or just overriding the
cookie path so the same cookie is used for two different session managers?
Stuart
On Wed, Dec 20, 2017 at 4:49 PM, Eric B <ebenzacar(a)gmail.com> wrote:
Hi Stuart,
Strangely enough, my web.xml does not have distributable defined.
I managed to get the InMemorySessionManager working by using a servlet
extension, but I can't help but think I'm using a sledge hammer to
configure it that way. I can't believe there isn't another way to enable
non distributable sessions.
My application is a JEE ear with 2 web apps (using a shared session
cookie) and an EJB package if that makes a difference.
Thanks
Eric
On Dec 19, 2017 5:44 PM, "Stuart Douglas" <stuart.w.douglas(a)gmail.com>
wrote:
If you remove <distributable/> from your web.xml you should just get the
InMemorySessionManager.
Stuart
On Wed, Dec 20, 2017 at 4:29 AM, Eric B <ebenzacar(a)gmail.com> wrote:
> I've continued digging into my issue and noticed that the default
> DistributableSessionManager uses the org.wildfly.clustering.web
> .infinispan.session.InfinispanSessionManager, which I guess comes from
> the module parameter in the cache-container definition.
>
> Part of my problem is that I am trying to invalidate() the session
> returned by the SessionManager, but when I do a
> SessionManager.getSession(sessionId), it returns an
> DistributableImmutableSession whose invalidate() method intentionally does
> nothing.
>
> So how can I invalidate a session? Is there no way to invalidate a
> session by sessionId with the DistributableSessionManager? If so, how? If
> not, how do I define a SessionManager that would give me access that?
>
> Thanks,
>
> Eric
>
> On Tue, Dec 19, 2017 at 11:38 AM, Eric B <ebenzacar(a)gmail.com> wrote:
>
>> Further to a previous post for session problems in my application, I
>> believe some of my issues relate to the DistributableSessions that are
>> being used by Wildfly. However, in my configuration file, I have my web
>> cache defined as a local cache:
>>
>>
>>
>> <subsystem xmlns="urn:jboss:domain:infinispan:4.0">
>> <cache-container name="server" aliases="singleton
cluster"
>> default-cache="default"
module="org.wildfly.clustering.server">
>> <transport lock-timeout="60000"/>
>> <replicated-cache name="default"
mode="SYNC">
>> <transaction mode="BATCH"/>
>> </replicated-cache>
>> </cache-container>
>> <cache-container name="web"
default-cache="passivation"
>> module="org.wildfly.clustering.web.infinispan">
>> <local-cache name="passivation">
>> <locking isolation="REPEATABLE_READ"/>
>> <transaction mode="BATCH"/>
>> <file-store passivation="true"
purge="false"/>
>> </local-cache>
>> <local-cache name="persistent">
>> <locking isolation="REPEATABLE_READ"/>
>> <transaction mode="BATCH"/>
>> <file-store passivation="false"
purge="false"/>
>> </local-cache>
>> </cache-container>
>> ...
>> ...
>>
>>
>> I see that undertow comes with an InMemorySessionManager, but not
>> entirely sure how to enable it. Do I have to go through the effort of
>> creating my own ServletExtension and configuring it in the
>> META-INF/services/io.undertow.servlet.ServletExtension or is there an
>> out-of-the-box way of enable functionality that already exists via the
>> config file?
>>
>> Thanks,
>>
>> Eric
>>
>
>
> _______________________________________________
> wildfly-dev mailing list
> wildfly-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/wildfly-dev
>