Tomcat 8 supportability changes added..

Tomcat 8 supportability changes added..
pull/1/merge
Ranjith 2016-03-19 22:05:27 +05:30
parent b1af72c916
commit 4bc46170cf
1 changed files with 9 additions and 9 deletions

View File

@ -133,8 +133,8 @@ public class RequestSessionManager extends ManagerBase implements Lifecycle
} catch (Exception e) { } catch (Exception e) {
log.error("Error while initializing serializer/rediscache", e); log.error("Error while initializing serializer/rediscache", e);
} }
log.info("The sessions will expire after " + getMaxInactiveInterval() + " seconds"); log.info("The sessions will expire after " + (getContext().getSessionTimeout() * 60) + " seconds");
setDistributable(true); getContext().setDistributable(true);
} }
@Override @Override
@ -162,7 +162,7 @@ public class RequestSessionManager extends ManagerBase implements Lifecycle
customSession.setNew(true); customSession.setNew(true);
customSession.setValid(true); customSession.setValid(true);
customSession.setCreationTime(System.currentTimeMillis()); customSession.setCreationTime(System.currentTimeMillis());
customSession.setMaxInactiveInterval(getMaxInactiveInterval()); customSession.setMaxInactiveInterval((getContext().getSessionTimeout() * 60));
customSession.setId(sessionId); customSession.setId(sessionId);
customSession.tellNew(); customSession.tellNew();
} }
@ -262,7 +262,7 @@ public class RequestSessionManager extends ManagerBase implements Lifecycle
serializer.deserializeSessionData(data, customSession, metadata); serializer.deserializeSessionData(data, customSession, metadata);
customSession.setId(id); customSession.setId(id);
customSession.setNew(false); customSession.setNew(false);
customSession.setMaxInactiveInterval(getMaxInactiveInterval()); customSession.setMaxInactiveInterval((getContext().getSessionTimeout() * 60));
customSession.access(); customSession.access();
customSession.setValid(true); customSession.setValid(true);
customSession.resetDirtyTracking(); customSession.resetDirtyTracking();
@ -296,8 +296,8 @@ public class RequestSessionManager extends ManagerBase implements Lifecycle
currentSessionSerializationMetadata.set(updatedSerializationMetadata); currentSessionSerializationMetadata.set(updatedSerializationMetadata);
currentSessionIsPersisted.set(true); currentSessionIsPersisted.set(true);
} }
log.trace("Setting expire timeout on session [" + customSession.getId() + "] to " + getMaxInactiveInterval()); log.trace("Setting expire timeout on session [" + customSession.getId() + "] to " + (getContext().getSessionTimeout() * 60));
requestSessionCacheUtils.expire(customSession.getId(), getMaxInactiveInterval()); requestSessionCacheUtils.expire(customSession.getId(), (getContext().getSessionTimeout() * 60));
} catch (IOException e) { } catch (IOException e) {
log.error("Error occured while storing the session object into redis", e); log.error("Error occured while storing the session object into redis", e);
} }
@ -333,8 +333,8 @@ public class RequestSessionManager extends ManagerBase implements Lifecycle
private void initializeSessionSerializer() throws Exception { private void initializeSessionSerializer() throws Exception {
serializer = new SessionDataSerializer(); serializer = new SessionDataSerializer();
Loader loader = null; Loader loader = null;
if (getContainer() != null) { if (getContext() != null) {
loader = getContainer().getLoader(); loader = getContext().getLoader();
} }
ClassLoader classLoader = null; ClassLoader classLoader = null;
if (loader != null) { if (loader != null) {
@ -342,4 +342,4 @@ public class RequestSessionManager extends ManagerBase implements Lifecycle
} }
serializer.setClassLoader(classLoader); serializer.setClassLoader(classLoader);
} }
} }