<div dir="ltr">It should be using this by default, unless the app is distributable. This sounds like a bug. Do you have a reproducer I can look at? All I can think of is that if you have a distributable web fragment in your app maybe we are merging them incorrectly.<div><br></div><div>Stuart</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 20, 2017 at 11:07 PM, Eric B <span dir="ltr">&lt;<a href="mailto:ebenzacar@gmail.com" target="_blank">ebenzacar@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">I&#39;ve changed the cookie path to / within the jboss-all.xml file in order for two war to share the same session.  (Each war has its own context path: /war1, /war).  I essentially need one war to be able to authenticate and authorize the user, and have that authentication/authorization carry over to the session in the other war.  I don&#39;t actually need to share the session other than for auth purposes.<div dir="auto"><br></div><div dir="auto">Is that feasible using the InMemorySessionManager?  Is there a way to ensure that they are all using the same InMemorySessionManager? </div><div dir="auto"><br></div><div dir="auto">Thanks</div><span class="HOEnZb"><font color="#888888"><div dir="auto"><br></div><div dir="auto">Eric</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Dec 20, 2017 1:10 AM, &quot;Stuart Douglas&quot; &lt;<a href="mailto:stuart.w.douglas@gmail.com" target="_blank">stuart.w.douglas@gmail.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Are you using the shared session functionality? Or just overriding the cookie path so the same cookie is used for two different session managers?<div><br></div><div>Stuart</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 20, 2017 at 4:49 PM, Eric B <span dir="ltr">&lt;<a href="mailto:ebenzacar@gmail.com" target="_blank">ebenzacar@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div><span><span style="font-family:sans-serif;font-size:12.8px">Hi Stuart,</span><div dir="auto" style="font-family:sans-serif;font-size:12.8px"><br></div><div dir="auto" style="font-family:sans-serif;font-size:12.8px">Strangely enough, my web.xml does not have distributable defined.</div><div dir="auto" style="font-family:sans-serif;font-size:12.8px"><br></div><div dir="auto" style="font-family:sans-serif;font-size:12.8px">I managed to get the InMemorySessionManager working by using a servlet extension, but I can&#39;t help but think I&#39;m using a sledge hammer to configure it that way.  I can&#39;t believe there isn&#39;t another way to enable non distributable sessions.</div><div dir="auto" style="font-family:sans-serif;font-size:12.8px"><br></div><div dir="auto" style="font-family:sans-serif;font-size:12.8px">My application is a JEE ear with 2 web apps (using a shared session cookie) and an EJB package if that makes a difference.</div><div dir="auto" style="font-family:sans-serif;font-size:12.8px"><br></div><div dir="auto" style="font-family:sans-serif;font-size:12.8px">Thanks</div><font color="#888888" style="font-family:sans-serif;font-size:12.8px"><div dir="auto"><br></div><div dir="auto">Eric</div></font><br></span><div class="gmail_extra"><br><div class="gmail_quote"><span>On Dec 19, 2017 5:44 PM, &quot;Stuart Douglas&quot; &lt;<a href="mailto:stuart.w.douglas@gmail.com" target="_blank">stuart.w.douglas@gmail.com</a>&gt; wrote:<br type="attribution"></span><div><div class="m_3528420259926771997m_8904058113080880666h5"><blockquote class="m_3528420259926771997m_8904058113080880666m_-4767039258243375877quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">If you remove &lt;distributable/&gt; from your web.xml you should just get the InMemorySessionManager. <div><br></div><div>Stuart</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div class="m_3528420259926771997m_8904058113080880666m_-4767039258243375877elided-text">On Wed, Dec 20, 2017 at 4:29 AM, Eric B <span dir="ltr">&lt;<a href="mailto:ebenzacar@gmail.com" target="_blank">ebenzacar@gmail.com</a>&gt;</span> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="m_3528420259926771997m_8904058113080880666m_-4767039258243375877elided-text"><div dir="ltr">I&#39;ve continued digging into my issue and noticed that the default DistributableSessionManager uses the org.wildfly.clustering.web<wbr>.infinispan.session.Infinispan<wbr>SessionManager, which I guess comes from the module parameter in the cache-container definition.<div><br></div><div>Part of my problem is that I am trying to invalidate() the session returned by the SessionManager, but when I do a SessionManager.getSession(sess<wbr>ionId), it returns an DistributableImmutableSession whose invalidate() method intentionally does nothing.</div><div><br>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?  </div><div><br></div><div>Thanks,</div><div><br>Eric</div></div><div class="m_3528420259926771997m_8904058113080880666m_-4767039258243375877m_1435291999400480596HOEnZb"><div class="m_3528420259926771997m_8904058113080880666m_-4767039258243375877m_1435291999400480596h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 19, 2017 at 11:38 AM, Eric B <span dir="ltr">&lt;<a href="mailto:ebenzacar@gmail.com" target="_blank">ebenzacar@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">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:<div><br></div><div><br><div><br></div><div><div>        &lt;subsystem xmlns=&quot;urn:jboss:domain:infini<wbr>span:4.0&quot;&gt;</div><div>            &lt;cache-container name=&quot;server&quot; aliases=&quot;singleton cluster&quot; default-cache=&quot;default&quot; module=&quot;org.wildfly.clustering<wbr>.server&quot;&gt;</div><div>                &lt;transport lock-timeout=&quot;60000&quot;/&gt;</div><div>                &lt;replicated-cache name=&quot;default&quot; mode=&quot;SYNC&quot;&gt;</div><div>                    &lt;transaction mode=&quot;BATCH&quot;/&gt;</div><div>                &lt;/replicated-cache&gt;</div><div>            &lt;/cache-container&gt;</div><div>            &lt;cache-container name=&quot;web&quot; default-cache=&quot;passivation&quot; module=&quot;org.wildfly.clustering<wbr>.web.infinispan&quot;&gt;</div><div>                &lt;local-cache name=&quot;passivation&quot;&gt;</div><div>                    &lt;locking isolation=&quot;REPEATABLE_READ&quot;/&gt;</div><div>                    &lt;transaction mode=&quot;BATCH&quot;/&gt;</div><div>                    &lt;file-store passivation=&quot;true&quot; purge=&quot;false&quot;/&gt;</div><div>                &lt;/local-cache&gt;</div><div>                &lt;local-cache name=&quot;persistent&quot;&gt;</div><div>                    &lt;locking isolation=&quot;REPEATABLE_READ&quot;/&gt;</div><div>                    &lt;transaction mode=&quot;BATCH&quot;/&gt;</div><div>                    &lt;file-store passivation=&quot;false&quot; purge=&quot;false&quot;/&gt;</div><div>                &lt;/local-cache&gt;</div><div>            &lt;/cache-container&gt;</div></div></div><div>...</div><div>...</div><div><br></div><br>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.<wbr>servlet.ServletExtension or is there an out-of-the-box way of enable functionality that already exists via the config file?<br><br>Thanks,<br><br>Eric</div>
</blockquote></div><br></div>
</div></div><br></div>______________________________<wbr>_________________<br>
wildfly-dev mailing list<br>
<a href="mailto:wildfly-dev@lists.jboss.org" target="_blank">wildfly-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailma<wbr>n/listinfo/wildfly-dev</a><br></blockquote></div><br></div>
</blockquote></div></div></div><br></div></div></div>
</blockquote></div><br></div>
</blockquote></div></div>
</div></div></blockquote></div><br></div>