[
https://issues.apache.org/jira/browse/GEODE-2889?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dan Smith resolved GEODE-2889.
------------------------------
Resolution: Fixed
Assignee: Dan Smith
Fix Version/s: 1.2.0
> Generic session module should touch sessions rather than recreate the native
> session
> ------------------------------------------------------------------------------------
>
> Key: GEODE-2889
> URL: https://issues.apache.org/jira/browse/GEODE-2889
> Project: Geode
> Issue Type: Bug
> Components: http session
> Reporter: Dan Smith
> Assignee: Dan Smith
> Fix For: 1.2.0
>
>
> The session module for generic application servers is doing some magic to try
> to recreate native sessions if they have been idle for too long. This can
> cause failures if the container expires a session concurrently, because the
> expiration can happen after we have checked if the session is valid, but
> before we can read the session creation time.
> {noformat}
> /*
> * This is a massively gross hack. Currently, there is no way to
> actually update the last
> * accessed time for a session, so what we do here is once we're into
> X% of the session's
> * TTL we grab a new session from the container.
> *
> * (inactive * 1000) * (pct / 100) ==> (inactive * 10 * pct)
> */
> if (session.getLastAccessedTime()
> - session.getCreationTime() > (session.getMaxInactiveInterval() *
> 10
> * percentInactiveTimeTriggerRebuild)) {
> HttpSession nativeSession = super.getSession();
> session.failoverSession(nativeSession);
> }
> {noformat}
> Instead of this, we should just call getSession on the container and have it
> update the last accessed time of the native session.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)