From 02563ce40f7b20f8f23048a8b87551400333c1c5 Mon Sep 17 00:00:00 2001 From: baayso Date: Tue, 6 Oct 2015 19:41:44 +0800 Subject: [PATCH 1/2] Update .gitignore --- .gitignore | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 982a41f6..6fe1ca73 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,34 @@ -.gradle/* -build/* -example-app/build/* -example-app/.gradle/* -.DS_Store +.svn + +bin +build +target .rspec +.gradle + +*.log + +*.class + +# Package Files # +*.jar +*.war +*.ear + +# Eclipse # +.project +.classpath +.settings + +# IntelliJ IDEA # +*.ipr +*.iws *.iml -.idea/* +.idea +out + +# Windows # +Thumbs.db + +# Mac # +.DS_Store From ad323702ed421aae70fe87ae25865ae9c08765f4 Mon Sep 17 00:00:00 2001 From: baayso Date: Tue, 6 Oct 2015 19:51:51 +0800 Subject: [PATCH 2/2] support Tomcat8 --- build.gradle | 15 ++++++++++----- .../tomcat/redissessions/RedisSessionManager.java | 6 +++--- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/build.gradle b/build.gradle index 2bd0db6a..7bec8be1 100644 --- a/build.gradle +++ b/build.gradle @@ -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.26' 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' @@ -24,7 +24,7 @@ dependencies { testCompile 'org.hamcrest:hamcrest-core:1.3' testCompile 'org.hamcrest:hamcrest-library:1.3' testCompile 'org.mockito:mockito-all:1.9.5' - testCompile group: 'org.apache.tomcat', name: 'tomcat-coyote', version: '7.0.27' + testCompile group: 'org.apache.tomcat', name: 'tomcat-coyote', version: '8.0.26' } task javadocJar(type: Jar, dependsOn: javadoc) { @@ -37,6 +37,11 @@ task sourcesJar(type: Jar) { classifier = 'sources' } +task releaseJar(type: Jar) { + from 'bin' + destinationDir = file('build/libs') +} + artifacts { archives jar @@ -53,9 +58,9 @@ uploadArchives { mavenDeployer { beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } - repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { - authentication(userName: sonatypeUsername, password: sonatypePassword) - } + //repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { + // authentication(userName: sonatypeUsername, password: sonatypePassword) + //} //repository(url: "https://oss.sonatype.org/content/repositories/snapshots") { // authentication(userName: sonatypeUsername, password: sonatypePassword) //} diff --git a/src/main/java/com/orangefunction/tomcat/redissessions/RedisSessionManager.java b/src/main/java/com/orangefunction/tomcat/redissessions/RedisSessionManager.java index 2b58a261..928877bf 100644 --- a/src/main/java/com/orangefunction/tomcat/redissessions/RedisSessionManager.java +++ b/src/main/java/com/orangefunction/tomcat/redissessions/RedisSessionManager.java @@ -275,7 +275,7 @@ protected synchronized void startInternal() throws LifecycleException { setState(LifecycleState.STARTING); Boolean attachedToValve = false; - for (Valve valve : getContainer().getPipeline().getValves()) { + for (Valve valve : getContext().getPipeline().getValves()) { if (valve instanceof RedisSessionHandlerValve) { this.handlerValve = (RedisSessionHandlerValve) valve; this.handlerValve.setRedisSessionManager(this); @@ -714,8 +714,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;