This is an automated email from the ASF dual-hosted git repository.
sabbey37 pushed a commit to branch support/1.12
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/support/1.12 by this push:
new bc05e41 GEODE-7896 Update tomcat support (#6289)
bc05e41 is described below
commit bc05e41217cd06197d566ac055d10216efae95df
Author: BenjaminPerryRoss <[email protected]>
AuthorDate: Fri Apr 9 06:23:56 2021 -0700
GEODE-7896 Update tomcat support (#6289)
Update tomcat integration to work with versions after 9.0.21.
(cherry picked from commit 70fe060bbdba951512403cc0795f29bd2d7d21d6)
Co-authored-by: Anthony Baker <[email protected]>
---
.../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 c6758c5..c5c9d42 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.96")
deps.put("tomcat8.version", "8.5.46")
- 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 a7da1ff..572fa20 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.96.zip"),
TOMCAT8(8, "tomcat-8.5.46.zip"),
- TOMCAT9(9, "tomcat-9.0.12.zip");
+ TOMCAT9(9, "tomcat-9.0.33.zip");
private final int version;