diff --git a/build.gradle b/build.gradle index 2bd0db6a..2b02d05c 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ apply plugin: 'maven' apply plugin: 'signing' group = 'com.orangefunction' -version = '2.0.0' +version = '2.0.3-tomcat8-gravie' repositories { mavenCentral() @@ -15,7 +15,7 @@ compileJava { } dependencies { - compile group: 'org.apache.tomcat', name: 'tomcat-catalina', version: '7.0.27' + compile group: 'org.apache.tomcat', name: 'tomcat-catalina', version: '8.0.15' compile group: 'redis.clients', name: 'jedis', version: '2.5.2' compile group: 'org.apache.commons', name: 'commons-pool2', version: '2.2' //compile group: 'commons-codec', name: 'commons-codec', version: '1.9' diff --git a/src/main/java/com/orangefunction/tomcat/redissessions/RedisSessionManager.java b/src/main/java/com/orangefunction/tomcat/redissessions/RedisSessionManager.java index 12af7308..a2fb307e 100644 --- a/src/main/java/com/orangefunction/tomcat/redissessions/RedisSessionManager.java +++ b/src/main/java/com/orangefunction/tomcat/redissessions/RedisSessionManager.java @@ -422,10 +422,7 @@ public Session findSession(String id) throws IOException { RedisSession session = null; if (null == id) { - currentSessionIsPersisted.set(false); - currentSession.set(null); - currentSessionSerializationMetadata.set(null); - currentSessionId.set(null); + return null; } else if (id.equals(currentSessionId.get())) { session = currentSession.get(); } else { @@ -437,11 +434,6 @@ public Session findSession(String id) throws IOException { currentSessionSerializationMetadata.set(container.metadata); currentSessionIsPersisted.set(true); currentSessionId.set(id); - } else { - currentSessionIsPersisted.set(false); - currentSession.set(null); - currentSessionSerializationMetadata.set(null); - currentSessionId.set(null); } } @@ -712,8 +704,8 @@ private void initializeSerializer() throws ClassNotFoundException, IllegalAccess Loader loader = null; - if (getContainer() != null) { - loader = getContainer().getLoader(); + if (getContext() != null) { + loader = getContext().getLoader(); } ClassLoader classLoader = null;