<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Session timeout with Primefaces Portlets</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=112502908" />
  <subtitle>Session timeout with Primefaces Portlets</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=112502908</id>
  <updated>2026-04-06T09:37:35Z</updated>
  <dc:date>2026-04-06T09:37:35Z</dc:date>
  <entry>
    <title>RE: Session timeout with Primefaces Portlets</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112524066" />
    <author>
      <name>William Gosse</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112524066</id>
    <updated>2019-02-28T19:05:34Z</updated>
    <published>2019-02-28T19:05:34Z</published>
    <summary type="html">Great! Thanks again for your input. Its always much appreciated.</summary>
    <dc:creator>William Gosse</dc:creator>
    <dc:date>2019-02-28T19:05:34Z</dc:date>
  </entry>
  <entry>
    <title>RE: Session timeout with Primefaces Portlets</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112524027" />
    <author>
      <name>David H Nebinger</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112524027</id>
    <updated>2019-02-28T18:56:31Z</updated>
    <published>2019-02-28T18:56:31Z</published>
    <summary type="html">Sure, yes everything is absolutely fine.&lt;br /&gt;&lt;br /&gt;I just wanted to point out the issue that you are adding a second AJAX request every time. It&amp;#39;s important to know, some folks care about the number of generated requests.&lt;br /&gt;​​​​​​​</summary>
    <dc:creator>David H Nebinger</dc:creator>
    <dc:date>2019-02-28T18:56:31Z</dc:date>
  </entry>
  <entry>
    <title>RE: Session timeout with Primefaces Portlets</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112523989" />
    <author>
      <name>William Gosse</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112523989</id>
    <updated>2019-02-28T18:43:59Z</updated>
    <published>2019-02-28T18:43:59Z</published>
    <summary type="html">So your saying its Ok? Its doing the right thing?</summary>
    <dc:creator>William Gosse</dc:creator>
    <dc:date>2019-02-28T18:43:59Z</dc:date>
  </entry>
  <entry>
    <title>RE: Session timeout with Primefaces Portlets</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112523958" />
    <author>
      <name>David H Nebinger</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112523958</id>
    <updated>2019-02-28T18:30:05Z</updated>
    <published>2019-02-28T18:30:05Z</published>
    <summary type="html">Sorry, guys, it doesn&amp;#39;t duplicate your request, it is a different request...&lt;br /&gt;&lt;br /&gt;It invokes /portal/extend_session which, in turn, will end up calling &lt;a href="https://github.com/liferay/liferay-portal/blob/7.1.2-ga3/portal-web/docroot/html/portal/extend_session.jsp"&gt;portal-web/docroot/html/portal/extend_session.jsp​​​​​​​&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So that is your second call.</summary>
    <dc:creator>David H Nebinger</dc:creator>
    <dc:date>2019-02-28T18:30:05Z</dc:date>
  </entry>
  <entry>
    <title>RE: Session timeout with Primefaces Portlets</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112523197" />
    <author>
      <name>William Gosse</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112523197</id>
    <updated>2019-02-28T17:29:58Z</updated>
    <published>2019-02-28T17:29:58Z</published>
    <summary type="html">By the way I&amp;#39;m still on LR7 GA7</summary>
    <dc:creator>William Gosse</dc:creator>
    <dc:date>2019-02-28T17:29:58Z</dc:date>
  </entry>
  <entry>
    <title>RE: Session timeout with Primefaces Portlets</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112522837" />
    <author>
      <name>William Gosse</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112522837</id>
    <updated>2019-02-28T17:00:23Z</updated>
    <published>2019-02-28T17:00:23Z</published>
    <summary type="html">Any chance you could look into this today? Again I&amp;#39;m not seeing anything bad that noticable but I loved to have your feedback as well? Thanks. </summary>
    <dc:creator>William Gosse</dc:creator>
    <dc:date>2019-02-28T17:00:23Z</dc:date>
  </entry>
  <entry>
    <title>RE: Session timeout with Primefaces Portlets</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112522808" />
    <author>
      <name>Kyle Joseph Stiemann</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112522808</id>
    <updated>2019-02-28T16:56:57Z</updated>
    <published>2019-02-28T16:56:57Z</published>
    <summary type="html">Hi William, if &lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace"&gt;Liferay.Session.extend()&lt;/span&gt; causes a second Ajax request, it would not necessarily duplicate the original JSF Ajax request. Instead it might send a special request to Liferay itself---bypassing your portlet entirely.I&amp;#39;d have to look into it further before I say for sure though. You can look at your browser console network logs to see what the request/response for &lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace"&gt;Liferay.Session.extend()&lt;/span&gt; is.  I doubt it would cause bugs, but it could affect performance.</summary>
    <dc:creator>Kyle Joseph Stiemann</dc:creator>
    <dc:date>2019-02-28T16:56:57Z</dc:date>
  </entry>
  <entry>
    <title>RE: Session timeout with Primefaces Portlets</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112522730" />
    <author>
      <name>William Gosse</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112522730</id>
    <updated>2019-02-28T16:45:04Z</updated>
    <published>2019-02-28T16:45:04Z</published>
    <summary type="html">I just tested your claim about the double ajax call and I can&amp;#39;t sustatiate it.  I have the following ajax tag in one of my facelets:&lt;br /&gt;&amp;lt;p:ajax event=&amp;#34;rowSelect&amp;#34; &lt;em&gt;&lt;strong&gt;oncomplete=&amp;#34;Liferay.Session.extend();&amp;#34;&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;listener=&amp;#34;#{docSetReviewView.onRowSelect}&amp;#34; update=&amp;#34;@form&amp;#34; /&amp;gt;&lt;br /&gt;&lt;br /&gt;I added a log info message to my backend method, onRowSelect:&lt;br /&gt;public void onRowSelect(SelectEvent event) {&lt;br /&gt;&lt;em&gt;&lt;strong&gt;LOGGER.info(&amp;#34;----&amp;gt; In onRowSelect!!!!&amp;#34;);&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;List&amp;lt;Doc&amp;gt; docs = docSet.getDocs();&lt;br /&gt;int rownum = docs.indexOf((Doc) event.getObject());&lt;br /&gt;docSet.getDocs().get(docIndex).setIndicator(null);&lt;br /&gt;docIndex = rownum;&lt;br /&gt;initCurrentDoc();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;I only see one log message for every row selection which i made 7 of:&lt;br /&gt;16:35:08,370 INFO  [DocTypeClient:107] Property: DOC_TYPE_SERVICE_URI = http://localhost:9080n&lt;br /&gt;16:35:14,154 INFO  [DocSetReviewView:560] ----&amp;gt; In onRowSelect!!!!&lt;br /&gt;16:35:16,829 INFO  [DocSetReviewView:560] ----&amp;gt; In onRowSelect!!!!&lt;br /&gt;16:35:19,130 INFO  [DocSetReviewView:560] ----&amp;gt; In onRowSelect!!!!&lt;br /&gt;16:35:22,073 INFO  [DocSetReviewView:560] ----&amp;gt; In onRowSelect!!!!&lt;br /&gt;16:35:26,041 INFO  [DocSetReviewView:560] ----&amp;gt; In onRowSelect!!!!&lt;br /&gt;16:35:28,214 INFO  [DocSetReviewView:560] ----&amp;gt; In onRowSelect!!!!&lt;br /&gt;16:41:59,313 INFO  [DocSetReviewView:560] ----&amp;gt; In onRowSelect!!!!&lt;br /&gt;&lt;br /&gt;Unless I&amp;#39;m not understanding the issue or that the Liferay.Session.extend(); is not really happening I can&amp;#39;t confirm a double call.&lt;br /&gt;&lt;br /&gt;Please let me know if there is anything else I should do to test or confirm this issue.</summary>
    <dc:creator>William Gosse</dc:creator>
    <dc:date>2019-02-28T16:45:04Z</dc:date>
  </entry>
  <entry>
    <title>RE: Session timeout with Primefaces Portlets</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112521527" />
    <author>
      <name>William Gosse</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112521527</id>
    <updated>2019-02-28T16:23:36Z</updated>
    <published>2019-02-28T16:23:36Z</published>
    <summary type="html">Hmmm well I haven&amp;#39;t commited this work yet. Are there any alternatives? </summary>
    <dc:creator>William Gosse</dc:creator>
    <dc:date>2019-02-28T16:23:36Z</dc:date>
  </entry>
  <entry>
    <title>RE: Session timeout with Primefaces Portlets</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112518759" />
    <author>
      <name>David H Nebinger</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112518759</id>
    <updated>2019-02-28T15:54:24Z</updated>
    <published>2019-02-28T15:54:24Z</published>
    <summary type="html">lol, I was sure it was the solution when I shared it...&lt;br /&gt;&lt;br /&gt;ROTFL...&lt;br /&gt;&lt;br /&gt;Actually there is a side effect...&lt;br /&gt;&lt;br /&gt;Liferay.Session.extend() does invoke a backend call so the backend keeps the session live.&lt;br /&gt;&lt;br /&gt;​​​​​​​This turns each single AJAX call into a double call.</summary>
    <dc:creator>David H Nebinger</dc:creator>
    <dc:date>2019-02-28T15:54:24Z</dc:date>
  </entry>
  <entry>
    <title>RE: Session timeout with Primefaces Portlets</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112518730" />
    <author>
      <name>William Gosse</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112518730</id>
    <updated>2019-02-28T15:53:06Z</updated>
    <published>2019-02-28T15:53:06Z</published>
    <summary type="html">I&amp;#39;ll be testing this more today. I just updated more code where I thought it was most appropriate and tested it with no issues or side effects.  I&amp;#39;ll be turning those changes over to my key users for the further validation.</summary>
    <dc:creator>William Gosse</dc:creator>
    <dc:date>2019-02-28T15:53:06Z</dc:date>
  </entry>
  <entry>
    <title>RE: Session timeout with Primefaces Portlets</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112517830" />
    <author>
      <name>William Gosse</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112517830</id>
    <updated>2019-02-28T15:49:46Z</updated>
    <published>2019-02-28T15:49:46Z</published>
    <summary type="html">Yes! That would be great Kyle.  Doing  some more searching it seems like this issue been around for a while.</summary>
    <dc:creator>William Gosse</dc:creator>
    <dc:date>2019-02-28T15:49:46Z</dc:date>
  </entry>
  <entry>
    <title>RE: Session timeout with Primefaces Portlets</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112517215" />
    <author>
      <name>Kyle Joseph Stiemann</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112517215</id>
    <updated>2019-02-28T15:42:17Z</updated>
    <published>2019-02-28T15:42:17Z</published>
    <summary type="html">Thanks for reporting this William and for providing a fix David. This seems like it could be a nice feature for the Bridge so I&amp;#39;ve opened a ticket for it: &lt;a href="https://issues.liferay.com/browse/FACES-3399"&gt;FACES-3399&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;​​​​​​​- Kyle</summary>
    <dc:creator>Kyle Joseph Stiemann</dc:creator>
    <dc:date>2019-02-28T15:42:17Z</dc:date>
  </entry>
  <entry>
    <title>RE: Session timeout with Primefaces Portlets</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112502994" />
    <author>
      <name>William Gosse</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112502994</id>
    <updated>2019-02-27T21:27:13Z</updated>
    <published>2019-02-27T21:27:13Z</published>
    <summary type="html">Thanks David. This looks great!</summary>
    <dc:creator>William Gosse</dc:creator>
    <dc:date>2019-02-27T21:27:13Z</dc:date>
  </entry>
  <entry>
    <title>RE: Session timeout with Primefaces Portlets</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112502949" />
    <author>
      <name>David H Nebinger</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112502949</id>
    <updated>2019-02-27T20:07:18Z</updated>
    <published>2019-02-27T20:07:18Z</published>
    <summary type="html">Faced a similar issue a long time back with Vaadin...&lt;br /&gt;&lt;br /&gt;The app server and the browser will have some timeout assigned, say 30 minutes. Every normal portlet request resets the timer so things like the redirect on expire don&amp;#39;t fire prematurely.&lt;br /&gt;&lt;br /&gt;However, when you are doing pure AJAX calls, you are not resetting the timer at all.  It will continue counting down in the browser, may continue counting down on the server.&lt;br /&gt;&lt;br /&gt;When you are in this boat, you should periodically call Liferay.Session.extend() to reset the browser side and server side timers.&lt;br /&gt;&lt;br /&gt;I will usually add this on every AJAX invocation, that way I don&amp;#39;t have to figure out when &amp;#34;periodically&amp;#34; should occur.</summary>
    <dc:creator>David H Nebinger</dc:creator>
    <dc:date>2019-02-27T20:07:18Z</dc:date>
  </entry>
  <entry>
    <title>Session timeout with Primefaces Portlets</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112502907" />
    <author>
      <name>William Gosse</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112502907</id>
    <updated>2019-02-27T19:41:13Z</updated>
    <published>2019-02-27T19:41:13Z</published>
    <summary type="html">I&amp;#39;m not sure if this an appropriate question for this group but I thought I&amp;#39;d give it a try and ask for forgivness later. &lt;br /&gt;&lt;br /&gt;I having some user say they are getting prematurely logout even while they using my portal.&lt;br /&gt;&lt;br /&gt;I&amp;#39;m not sure if this is a side affect of using Primefaces for my portlets that are based on ajax. I&amp;#39;m also using SennaJs as well.&lt;br /&gt;&lt;br /&gt;I&amp;#39;m using the default 30 session timout. Here are the session related parameters I have setup in my portal-ext.properties file:&lt;br /&gt;session.timeout.warning=0&lt;br /&gt;session.timeout.auto.extend=false&lt;br /&gt;session.timeout.redirect.on.expire=true&lt;br /&gt;&lt;br /&gt;I&amp;#39;ll admit this is one part of Liferay&amp;#39;s properties that sometimes alludes me.  &lt;br /&gt;&lt;br /&gt;If anyone has any thoughts on this please share. It would be greatly appreciated.</summary>
    <dc:creator>William Gosse</dc:creator>
    <dc:date>2019-02-27T19:41:13Z</dc:date>
  </entry>
</feed>
