You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by sa...@apache.org on 2021/04/13 14:28:16 UTC
[geode] 06/11: GEODE-7896 Update tomcat support
This is an automated email from the ASF dual-hosted git repository.
sabbey37 pushed a commit to branch support/1.13
in repository https://gitbox.apache.org/repos/asf/geode.git
commit d5bc7e891fc4570ed57fcc8817972d3b13bd1bee
Author: Anthony Baker <ab...@apache.org>
AuthorDate: Wed May 13 12:04:43 2020 -0700
GEODE-7896 Update tomcat support
Update tomcat integration to work with versions after 9.0.21.
(cherry picked from commit 70fe060bbdba951512403cc0795f29bd2d7d21d6)
---
.../gradle/plugins/DependencyConstraints.groovy | 2 +-
.../modules/session/catalina/DeltaSession.java | 24 +++++++++++++++++++++-
.../apache/geode/session/tests/TomcatInstall.java | 2 +-
3 files changed, 25 insertions(+), 3 deletions(-)
diff --git a/buildSrc/src/main/groovy/org/apache/geode/gradle/plugins/DependencyConstraints.groovy b/buildSrc/src/main/groovy/org/apache/geode/gradle/plugins/DependencyConstraints.groovy
index 9098324..ec8449e 100644
--- a/buildSrc/src/main/groovy/org/apache/geode/gradle/plugins/DependencyConstraints.groovy
+++ b/buildSrc/src/main/groovy/org/apache/geode/gradle/plugins/DependencyConstraints.groovy
@@ -53,7 +53,7 @@ class DependencyConstraints implements Plugin<Project> {
deps.put("tomcat6.version", "6.0.37")
deps.put("tomcat7.version", "7.0.99")
deps.put("tomcat8.version", "8.5.50")
- deps.put("tomcat9.version", "9.0.12")
+ deps.put("tomcat9.version", "9.0.33")
// The jetty version is also hard-coded in geode-assembly:test
// at o.a.g.sessions.tests.GenericAppServerInstall.java
diff --git a/extensions/geode-modules/src/main/java/org/apache/geode/modules/session/catalina/DeltaSession.java b/extensions/geode-modules/src/main/java/org/apache/geode/modules/session/catalina/DeltaSession.java
index aa8b3f5..4e5e969 100644
--- a/extensions/geode-modules/src/main/java/org/apache/geode/modules/session/catalina/DeltaSession.java
+++ b/extensions/geode-modules/src/main/java/org/apache/geode/modules/session/catalina/DeltaSession.java
@@ -366,7 +366,29 @@ public class DeltaSession extends StandardSession
@Override
public void localUpdateAttribute(String name, Object value) {
- super.setAttribute(name, value, false); // don't do notification since this is a replication
+ if (this.manager == null) {
+ // Name cannot be null
+ if (name == null) {
+ throw new IllegalArgumentException(sm.getString("standardSession.setAttribute.namenull"));
+ }
+
+ // Null value is the same as removeAttribute()
+ if (value == null) {
+ removeAttribute(name);
+ return;
+ }
+
+ // Validate our current state
+ if (!isValidInternal()) {
+ throw new IllegalStateException(
+ sm.getString("standardSession.setAttribute.ise", getIdInternal()));
+ }
+
+ // Replace or add this attribute
+ getAttributes().put(name, value);
+ } else {
+ super.setAttribute(name, value, false); // don't do notification since this is a replication
+ }
}
@Override
diff --git a/geode-assembly/geode-assembly-test/src/main/java/org/apache/geode/session/tests/TomcatInstall.java b/geode-assembly/geode-assembly-test/src/main/java/org/apache/geode/session/tests/TomcatInstall.java
index 90eeaa5..322558e 100644
--- a/geode-assembly/geode-assembly-test/src/main/java/org/apache/geode/session/tests/TomcatInstall.java
+++ b/geode-assembly/geode-assembly-test/src/main/java/org/apache/geode/session/tests/TomcatInstall.java
@@ -43,7 +43,7 @@ public class TomcatInstall extends ContainerInstall {
TOMCAT6(6, "tomcat-6.0.37.zip"),
TOMCAT7(7, "tomcat-7.0.99.zip"),
TOMCAT8(8, "tomcat-8.5.50.zip"),
- TOMCAT9(9, "tomcat-9.0.12.zip");
+ TOMCAT9(9, "tomcat-9.0.33.zip");
private final int version;