This is an automated email from the ASF dual-hosted git repository.

abaker pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/develop by this push:
     new 70fe060  GEODE-7896 Update tomcat support
     new bcbc53b  Merge pull request #5110 from metatype/develop
70fe060 is described below

commit 70fe060bbdba951512403cc0795f29bd2d7d21d6
Author: Anthony Baker <aba...@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.
---
 .../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 e8605d0..14d6b034 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;
 

Reply via email to