[wildfly-dev] How to configure Wildfly to use the InMemorySessionManager instead of DistributableSessionManager?
Stuart Douglas
stuart.w.douglas at gmail.com
Tue Dec 19 17:44:25 EST 2017
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 at 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 at 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 at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20171220/d1dcc440/attachment-0001.html
More information about the wildfly-dev
mailing list