diff --git a/.asf.yaml b/.asf.yaml
deleted file mode 100644
index 734b2b573867..000000000000
--- a/.asf.yaml
+++ /dev/null
@@ -1,60 +0,0 @@
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-github:
- description: "Apache Geode"
- homepage: https://geode.apache.org/
- labels:
- - geode
- - datagrid
- - apache
- features:
- # To enable wiki for documentation
- wiki: false
- # To enable issue management
- issues: false
- # To enable projects for project management boards
- projects: true
-
- enabled_merge_buttons:
- # enable squash button:
- squash: true
- # disable merge button:
- merge: false
- # enable rebase button:
- rebase: true
-
- protected_branches:
- develop:
- required_status_checks:
- # strict means "Require branches to be up to date before merging".
- strict: false
- # contexts are the names of checks that must pass
- contexts:
- - concourse-ci/api-check-test-openjdk11
- - concourse-ci/build
- - concourse-ci/unit-test-openjdk11
- - "Analyze (java)"
- - "Analyze (javascript)"
- - "Analyze (python)"
- - "Analyze (go)"
- - CodeQL
-
- required_pull_request_reviews:
- dismiss_stale_reviews: false
- require_code_owner_reviews: true
- required_approving_review_count: 1
-
- required_signatures: false
-
-notifications:
- commits: commits@geode.apache.org
- issues: issues@geode.apache.org
- pullrequests: notifications@geode.apache.org
- jira_options: link label
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index d7fc81031212..aa0c8cb844a4 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -1,24 +1 @@
-
-
-
-
-### For all changes:
-- [ ] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?
-
-- [ ] Has your PR been rebased against the latest commit within the target branch (typically `develop`)?
-
-- [ ] Is your initial contribution a single, squashed commit?
-
-- [ ] Does `gradlew build` run cleanly?
-
-- [ ] Have you written or updated unit tests to verify your changes?
-
-- [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
-
-
+description here (optional)
\ No newline at end of file
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
deleted file mode 100644
index a9d97c00418b..000000000000
--- a/.github/workflows/codeql.yml
+++ /dev/null
@@ -1,97 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-# For most projects, this workflow file will not need changing; you simply need
-# to commit it to your repository.
-#
-# You may wish to alter this file to override the set of languages analyzed,
-# or to provide custom queries or build logic.
-#
-# ******** NOTE ********
-# We have attempted to detect the languages in your repository. Please check
-# the `language` matrix defined below to confirm you have the correct set of
-# supported CodeQL languages.
-#
-name: "CodeQL"
-
-on:
- push:
- branches: [ develop ]
- pull_request:
- # The branches below must be a subset of the branches above
- branches: [ develop ]
- schedule:
- - cron: '22 22 * * 2'
-
-jobs:
- analyze:
- name: Analyze
- runs-on: ubuntu-latest
- permissions:
- actions: read
- contents: read
- security-events: write
-
- strategy:
- fail-fast: false
- matrix:
- language: [ 'go', 'java', 'javascript', 'python' ]
- # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
- # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
-
- steps:
- - name: Checkout repository
- uses: actions/checkout@v3
-
- - name: Setup Java JDK
- uses: actions/setup-java@v2.3.1
- with:
- java-version: 8
- distribution: temurin
- cache: gradle
-
- # Initializes the CodeQL tools for scanning.
- - name: Initialize CodeQL
- uses: github/codeql-action/init@v2
- with:
- languages: ${{ matrix.language }}
- # If you wish to specify custom queries, you can do so here or in a config file.
- # By default, queries listed here will override any specified in a config file.
- # Prefix the list here with "+" to use these queries and those in the config file.
-
- # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
- # queries: security-extended,security-and-quality
-
-
- # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
- # If this step fails, then you should remove it and run the build manually (see below)
- - name: Autobuild
- uses: github/codeql-action/autobuild@v2
- if: matrix.language != 'java'
- # ℹ️ Command-line programs to run using the OS shell.
- # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
-
- # If the Autobuild fails above, remove it and uncomment the following three lines.
- # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
- # - run: |
- # echo "Run, Build Application using script"
- # ./location_of_script_within_repo/buildscript.sh
- - run: ./gradlew dev installDist --no-daemon --no-build-cache
- if: matrix.language == 'java'
-
- - name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v2
diff --git a/BUILDING.md b/BUILDING.md
index b25ed3db394f..d924dc329ddd 100644
--- a/BUILDING.md
+++ b/BUILDING.md
@@ -10,10 +10,7 @@ Set the JAVA\_HOME environment variable. For example:
| OSX | ``export JAVA_HOME=`/usr/libexec/java_home -v 1.8` `` |
| Windows | ``set JAVA_HOME="C:\Program Files\Java\jdk1.8.0_121"`` |
-Download the project source from the Releases page at
-[Apache Geode](http://geode.apache.org/releases/), and unpack the source code.
-
-Within the directory containing the unpacked source code, run the gradle build:
+Run the gradle build:
```console
$ ./gradlew build
@@ -81,17 +78,17 @@ The following steps have been tested with **IntelliJ IDEA 2020.3.3**
1. Enter **To:** *GeodeStyle*, check **Current scheme**, and press **OK**.
1. Select *GeodeStyle* in **Scheme** drop-down box.
-1. Make Apache the default Copyright.
+1. Make VMware the default Copyright.
1. Select **IntelliJ IDEA -> Preferences...** from the menu.
1. Open the **Editor -> Copyright** section.
- 1. If *Apache* does not appear in the **Default project copyright** drop-down box:
+ 1. If *VMware* does not appear in the **Default project copyright** drop-down box:
1. Open the **Copyright Profiles** subsection.
1. Select the "import" icon (the small arrow pointing down and to the left) from the
Copyright Profiles section's toolbar.
- 1. Select `etc/intellij-apache-copyright-notice.xml` from the Geode repository root.
+ 1. Select `etc/intellij-vmware-copyright-notice.xml` from the repository root.
1. Return to the **Copyright** section.
- 1. Select *Apache* in the **Default project copyright** drop-down box.
+ 1. Select *VMware* in the **Default project copyright** drop-down box.
1. Open the **Formatting** subsection.
1. Uncheck **Add blank line after** and select **OK**.
diff --git a/CODEOWNERS b/CODEOWNERS
deleted file mode 100644
index 092d63324731..000000000000
--- a/CODEOWNERS
+++ /dev/null
@@ -1,317 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#-----------------------------------------------------------------
-# CODEOWNERS and .asf.yml - ownerless so everyone "owns" it
-#-----------------------------------------------------------------
-#CODEOWNERS
-#.asf.yaml
-
-#-----------------------------------------------------------------
-# Serialization
-#-----------------------------------------------------------------
-geode-serialization/** @echobravopapa @Bill @kirklund @kamilla1201 @jchen21 @pivotal-jbarrett
-geode-serialization/**/internal/serialization/filter/* @kirklund @jchen21
-geode-core/**/org/apache/geode/pdx/** @upthewaterspout @dschneider-pivotal @agingade @pivotal-jbarrett
-geode-core/**/org/apache/geode/codeAnalysis/** @upthewaterspout @dschneider-pivotal @agingade @kirklund
-geode-core/**/org/apache/geode/internal/* @echobravopapa @Bill @kirklund @kamilla1201 @pivotal-jbarrett
-geode-core/**/META-INF/**/*SanctionedSerializablesService @kirklund @jchen21
-
-#-----------------------------------------------------------------
-# Membership
-#-----------------------------------------------------------------
-geode-membership/** @echobravopapa @Bill @kamilla1201 @pivotal-jbarrett
-geode-old-client-support/** @echobravopapa @Bill @kamilla1201 @pivotal-jbarrett
-geode-tcp-server/** @echobravopapa @Bill @kamilla1201 @pivotal-jbarrett
-geode-core/**/org/apache/geode/distributed/internal/membership/** @echobravopapa @Bill @kamilla1201 @pivotal-jbarrett
-
-#-----------------------------------------------------------------
-# P2P Messaging
-#-----------------------------------------------------------------
-geode-core/**/org/apache/geode/internal/tcp/** @echobravopapa @Bill @kamilla1201 @pivotal-jbarrett
-geode-core/**/org/apache/geode/distributed/internal/direct/** @echobravopapa @Bill @kamilla1201 @pivotal-jbarrett
-geode-core/**/org/apache/geode/internal/net/** @echobravopapa @Bill @kamilla1201 @pivotal-jbarrett
-geode-core/**/org/apache/geode/net/** @Bill @mivanac @kamilla1201 @pivotal-jbarrett
-geode-core/**/org/apache/geode/distributed/* @echobravopapa @Bill @kirklund @kamilla1201 @pivotal-jbarrett
-geode-core/**/org/apache/geode/distributed/internal/* @echobravopapa @Bill @kirklund @kamilla1201 @pivotal-jbarrett
-
-#-----------------------------------------------------------------
-# Client/server messaging and cache operations
-#-----------------------------------------------------------------
-geode-core/**/org/apache/geode/cache/client/** @echobravopapa @Bill @kamilla1201 @pivotal-jbarrett
-geode-core/**/org/apache/geode/cache/server/** @echobravopapa @Bill @kamilla1201 @pivotal-jbarrett
-geode-core/**/org/apache/geode/cache/client/internal/** @Bill @echobravopapa @kamilla1201 @pivotal-jbarrett
-geode-core/**/org/apache/geode/internal/cache/tier/** @Bill @echobravopapa @agingade @kamilla1201 @pivotal-jbarrett
-geode-assembly/**/apache/geode/client/sni/** @Bill @echobravopapa @kamilla1201 @pivotal-jbarrett
-
-#-----------------------------------------------------------------
-# Client Queues
-#-----------------------------------------------------------------
-geode-core/**/org/apache/geode/internal/cache/ha/** @agingade @boglesby @nabarunnag
-geode-core/**/org/apache/geode/internal/cache/**/CacheClient* @agingade @boglesby @nabarunnag
-
-#-----------------------------------------------------------------
-# Core Public API packages - Cache, Region, etc.
-#-----------------------------------------------------------------
-geode-core/**/org/apache/geode/* @dschneider-pivotal @boglesby @nabarunnag @pivotal-jbarrett
-geode-core/**/org/apache/geode/cache/* @dschneider-pivotal @boglesby @nabarunnag @pivotal-jbarrett
-geode-core/**/org/apache/geode/cache/util/** @dschneider-pivotal @boglesby @nabarunnag @pivotal-jbarrett
-
-#-----------------------------------------------------------------
-# Distributed Locks
-#-----------------------------------------------------------------
-geode-core/**/org/apache/geode/distributed/internal/locks/** @dschneider-pivotal @pivotal-eshu @kirklund
-geode-core/**/org/apache/geode/distributed/internal/deadlock/** @dschneider-pivotal @pivotal-eshu @kirklund
-
-#-----------------------------------------------------------------
-# Core region implementations and plumbing
-#-----------------------------------------------------------------
-geode-core/**/org/apache/geode/internal/cache/* @nabarunnag @DonalEvans @jchen21
-
-#-----------------------------------------------------------------
-# Region entry management
-#-----------------------------------------------------------------
-geode-core/**/org/apache/geode/internal/cache/entries/** @dschneider-pivotal @upthewaterspout
-geode-core/**/org/apache/geode/internal/cache/region/entry/** @dschneider-pivotal @upthewaterspout
-geode-core/**/org/apache/geode/internal/cache/map/** @dschneider-pivotal @upthewaterspout
-geode-core/**/org/apache/geode/compression/** @dschneider-pivotal @kirklund
-geode-core/**/org/apache/geode/internal/cache/compression/** @dschneider-pivotal @kirklund
-
-#-----------------------------------------------------------------
-# Partitioned Regions
-#-----------------------------------------------------------------
-geode-rebalancer/** @boglesby @BenjaminPerryRoss @nabarunnag
-geode-core/**/org/apache/geode/internal/cache/partitioned/** @boglesby @BenjaminPerryRoss @nabarunnag
-geode-core/**/org/apache/geode/cache/partition/** @boglesby @BenjaminPerryRoss @nabarunnag
-
-#-----------------------------------------------------------------
-# Event tracking
-#-----------------------------------------------------------------
-geode-core/**/org/apache/geode/internal/cache/event/** @agingade @nabarunnag @gesterzhou
-
-#-----------------------------------------------------------------
-# Eviction
-#-----------------------------------------------------------------
-geode-core/**/org/apache/geode/internal/cache/eviction/** @agingade @dschneider-pivotal
-geode-core/**/org/apache/geode/internal/size/** @agingade @dschneider-pivotal @kirklund
-
-#-----------------------------------------------------------------
-# Offheap
-#-----------------------------------------------------------------
-geode-core/**/org/apache/geode/internal/offheap/** @pivotal-eshu @dschneider-pivotal @kirklund
-
-#-----------------------------------------------------------------
-# Transactions
-#-----------------------------------------------------------------
-geode-core/**/org/apache/geode/internal/cache/tx/** @pivotal-eshu @gesterzhou
-geode-core/**/org/apache/geode/internal/jta/** @pivotal-eshu @gesterzhou
-geode-core/**/org/apache/geode/internal/cache/locks/** @pivotal-eshu @gesterzhou
-
-#-----------------------------------------------------------------
-# Function Execution
-#-----------------------------------------------------------------
-geode-core/**/org/apache/geode/internal/cache/execute/** @boglesby @nabarunnag @pivotal-jbarrett
-geode-core/**/org/apache/geode/cache/execute/** @boglesby @nabarunnag @pivotal-jbarrett
-
-#-----------------------------------------------------------------
-# Querying
-#-----------------------------------------------------------------
-geode-cq/** @nabarunnag @DonalEvans @agingade
-geode-core/**/org/apache/geode/cache/query/** @nabarunnag @DonalEvans @agingade
-
-#-----------------------------------------------------------------
-# Session State:
-#-----------------------------------------------------------------
-extensions/** @jdeppe-pivotal @BenjaminPerryRoss @pivotal-jbarrett
-geode-core/**/org/apache/geode/internal/modules/util/** @jdeppe-pivotal @BenjaminPerryRoss @pivotal-jbarrett
-geode-assembly/**/org/apache/geode/session/** @jdeppe-pivotal @BenjaminPerryRoss @pivotal-jbarrett
-
-#-----------------------------------------------------------------
-# DEV rest API
-#-----------------------------------------------------------------
-geode-web-api/** @jdeppe-pivotal @jinmeiliao
-geode-assembly/**/org/apache/geode/rest/** @jdeppe-pivotal @jinmeiliao
-
-#-----------------------------------------------------------------
-# Lucene integration
-#-----------------------------------------------------------------
-geode-lucene/** @nabarunnag @DonalEvans
-
-#-----------------------------------------------------------------
-# Memcached integration
-#-----------------------------------------------------------------
-geode-memcached/** @nabarunnag @DonalEvans
-
-#-----------------------------------------------------------------
-# Misc Utilities
-#-----------------------------------------------------------------
-geode-core/**/org/apache/geode/internal/util/** @nabarunnag @boglesby @kirklund @pivotal-jbarrett
-geode-core/**/org/apache/geode/internal/util/concurrent/** @nabarunnag @boglesby @kirklund @pivotal-jbarrett
-geode-core/**/org/apache/geode/internal/shared/** @nabarunnag @boglesby @kirklund @pivotal-jbarrett
-geode-core/**/org/apache/geode/internal/sequencelog/** @nabarunnag @boglesby @pivotal-jbarrett
-geode-core/**/org/apache/geode/internal/concurrent/** @nabarunnag @boglesby @pivotal-jbarrett
-geode-core/**/org/apache/geode/distributed/internal/unsafe/** @nabarunnag @boglesby @pivotal-jbarrett
-geode-core/**/org/apache/geode/internal/lang/** @nabarunnag @boglesby @kirklund @pivotal-jbarrett
-geode-core/**/org/apache/geode/internal/monitoring/** @nabarunnag @boglesby @pivotal-jbarrett
-geode-core/**/org/apache/geode/internal/exception/** @nabarunnag @boglesby @pivotal-jbarrett
-geode-core/**/org/apache/geode/lang/** @nabarunnag @boglesby @kirklund @pivotal-jbarrett
-geode-core/**/org/apache/geode/ra/** @nabarunnag @boglesby @pivotal-jbarrett
-geode-core/**/org/apache/geode/internal/cache/vmotion/** @nabarunnag @boglesby @pivotal-jbarrett
-geode-core/**/org/apache/geode/internal/jndi/** @nabarunnag @boglesby @pivotal-jbarrett
-geode-common/** @nabarunnag @boglesby @kirklund @pivotal-jbarrett
-geode-unsafe/** @nabarunnag @boglesby @kirklund @pivotal-jbarrett
-
-#-----------------------------------------------------------------
-# Persistence
-#-----------------------------------------------------------------
-geode-core/**/org/apache/geode/cache/persistence/** @dschneider-pivotal @jchen21 @upthewaterspout @gesterzhou
-geode-core/**/org/apache/geode/internal/cache/persistence/** @dschneider-pivotal @jchen21 @upthewaterspout @gesterzhou
-geode-core/**/org/apache/geode/internal/cache/backup/** @dschneider-pivotal @agingade @jchen21 @upthewaterspout @gesterzhou
-geode-assembly/**/org/apache/geode/cache/persistence/** @dschneider-pivotal @jchen21 @upthewaterspout @gesterzhou
-
-#-----------------------------------------------------------------
-# Region Version Vectors - used for sychronization on
-# member failures and persistent recovery
-#-----------------------------------------------------------------
-geode-core/**/org/apache/geode/internal/cache/versions/** @dschneider-pivotal @gesterzhou
-
-#-----------------------------------------------------------------
-# WAN messaging and queues
-#-----------------------------------------------------------------
-geode-wan/** @gesterzhou @boglesby @nabarunnag @pivotal-jbarrett
-geode-core/**/org/apache/geode/cache/asyncqueue/** @gesterzhou @boglesby @nabarunnag @pivotal-jbarrett
-geode-core/**/org/apache/geode/cache/wan/** @gesterzhou @boglesby @nabarunnag @pivotal-jbarrett
-geode-core/**/org/apache/geode/internal/cache/wan/** @gesterzhou @boglesby @nabarunnag @pivotal-jbarrett
-geode-assembly/**/apache/geode/cache/wan/** @gesterzhou @boglesby @nabarunnag @pivotal-jbarrett
-
-#-----------------------------------------------------------------
-# Management
-#-----------------------------------------------------------------
-geode-management/** @jdeppe-pivotal @jinmeiliao
-geode-assembly/**/org/apache/geode/management/** @jdeppe-pivotal @jinmeiliao
-geode-assembly/**/org/apache/geode/tools/pulse/** @jdeppe-pivotal @jinmeiliao
-geode-web-management/** @jdeppe-pivotal @jinmeiliao
-geode-gfsh/** @jdeppe-pivotal @jinmeiliao
-geode-assembly/**/bin/** @jdeppe-pivotal @jinmeiliao @kirklund
-geode-pulse/** @jdeppe-pivotal @jinmeiliao
-geode-http-service/** @jdeppe-pivotal @jinmeiliao
-geode-web/** @jdeppe-pivotal @jinmeiliao
-geode-core/**/org/apache/geode/admin/** @jdeppe-pivotal @jinmeiliao @kirklund
-geode-core/**/org/apache/geode/alerting/** @jdeppe-pivotal @jinmeiliao @kirklund
-geode-core/**/org/apache/geode/management/** @jdeppe-pivotal @jinmeiliao
-geode-core/**/org/apache/geode/cache/configuration/** @jdeppe-pivotal @jinmeiliao
-geode-core/**/org/apache/geode/internal/admin/** @jdeppe-pivotal @jinmeiliao @kirklund
-geode-core/**/org/apache/geode/internal/cache/xmlcache/** @jdeppe-pivotal @jinmeiliao
-geode-core/**/org/apache/geode/internal/cache/extension/** @jdeppe-pivotal @jinmeiliao
-geode-core/**/org/apache/geode/internal/config/** @jdeppe-pivotal @jinmeiliao
-geode-core/**/org/apache/geode/internal/process/** @jdeppe-pivotal @jinmeiliao @kirklund
-geode-core/**/org/apache/geode/cache/internal/* @jdeppe-pivotal @jinmeiliao
-
-#-----------------------------------------------------------------
-# Security
-#-----------------------------------------------------------------
-geode-core/**/org/apache/geode/examples/** @jdeppe-pivotal @jinmeiliao @pivotal-jbarrett
-geode-core/**/org/apache/geode/examples/security/** @jdeppe-pivotal @jinmeiliao @pivotal-jbarrett
-geode-core/**/org/apache/geode/security/** @jdeppe-pivotal @jinmeiliao @kirklund @pivotal-jbarrett
-geode-core/**/org/apache/geode/internal/security/** @jdeppe-pivotal @jinmeiliao @kirklund @pivotal-jbarrett
-geode-core/**/org/apache/geode/cache/operations/** @jdeppe-pivotal @jinmeiliao @pivotal-jbarrett
-geode-core/**/org/apache/geode/internal/cache/operations/** @jdeppe-pivotal @jinmeiliao @pivotal-jbarrett
-geode-assembly/**/apache/geode/ssl/** @jdeppe-pivotal @jinmeiliao @pivotal-jbarrett
-
-#-----------------------------------------------------------------
-# Logging
-#-----------------------------------------------------------------
-geode-log4j/** @kirklund @gesterzhou
-geode-logging/** @kirklund @gesterzhou
-geode-core/**/org/apache/geode/logging/** @kirklund @gesterzhou
-geode-core/**/org/apache/geode/internal/logging/** @kirklund @gesterzhou
-geode-core/**/org/apache/geode/i18n/** @agingade @kirklund
-geode-core/**/org/apache/geode/internal/i18n/** @agingade @kirklund
-geode-core/**/org/apache/geode/internal/io/** @agingade @kirklund
-geode-assembly/**/org/apache/geode/logging/** @agingade @kirklund
-
-#-----------------------------------------------------------------
-# Metrics & Statistics
-#-----------------------------------------------------------------
-geode-core/**/org/apache/geode/internal/statistics/** @kirklund @pivotal-jbarrett
-geode-core/**/org/apache/geode/internal/stats50/** @kirklund @pivotal-jbarrett
-geode-core/**/org/apache/geode/metrics/** @kirklund @pivotal-jbarrett
-geode-assembly/**/org/apache/geode/metrics/** @kirklund @pivotal-jbarrett
-
-#-----------------------------------------------------------------
-# Region Snapshots
-#-----------------------------------------------------------------
-geode-core/**/org/apache/geode/cache/snapshot/** @agingade @jchen21
-geode-core/**/org/apache/geode/internal/cache/snapshot/** @agingade @jchen21
-
-#-----------------------------------------------------------------
-# JDBC connector
-#-----------------------------------------------------------------
-geode-connectors/** @agingade @jchen21
-geode-core/**/org/apache/geode/datasource/** @agingade @BenjaminPerryRoss @jchen21
-geode-core/**/org/apache/geode/internal/datasource/** @agingade @BenjaminPerryRoss @jchen21
-
-#-----------------------------------------------------------------
-# Resource manager
-#-----------------------------------------------------------------
-geode-core/**/org/apache/geode/cache/control/** @kirklund @DonalEvans
-geode-core/**/org/apache/geode/internal/cache/control/** @kirklund @DonalEvans
-
-#-----------------------------------------------------------------
-# Testing utilities
-#-----------------------------------------------------------------
-#geode-concurrency-test/**
-geode-dunit/** @kirklund @demery-pivotal @dschneider-pivotal
-geode-junit/** @kirklund @demery-pivotal @dschneider-pivotal
-geode-jmh/** @pivotal-jbarrett
-geode-junit/**/org/apache/geode/test/util/** @jdeppe-pivotal @kirklund
-geode-assembly/**/org/apache/geode/test/junit/** @jdeppe-pivotal @jinmeiliao
-geode-assembly/**/org/apache/geode/rules/** @jdeppe-pivotal @jinmeiliao
-geode-assembly/**/org/apache/geode/launchers/** @dschneider-pivotal @boglesby @nabarunnag
-geode-assembly/**/resources/** @boglesby @nabarunnag @jdeppe-pivotal @jinmeiliao
-
-#-----------------------------------------------------------------
-# Build and tooling
-#-----------------------------------------------------------------
-#etc/**
-*gradle* @rhoughton-pivot @upthewaterspout
-build-tools/** @rhoughton-pivot @jdeppe-pivotal
-DependencyConstraints.groovy @dickcav @rhoughton-pivot
-ci/** @dickcav @rhoughton-pivot @smgoller
-ci/scripts/** @dickcav @rhoughton-pivot @smgoller
-ci/scripts/repeat-new-tests.sh @dickcav @rhoughton-pivot @smgoller @upthewaterspout @jdeppe-pivotal
-dev-tools/dependencies/** @dickcav @onichols-pivotal
-dev-tools/release/** @dickcav @onichols-pivotal
-docker/** @dickcav @smgoller
-geode-management/src/test/script/update-management-wiki.sh @dickcav @onichols-pivotal
-#boms/**
-static-analysis/** @rhoughton-pivot @upthewaterspout
-geode-old-versions/** @dickcav @rhoughton-pivot
-KEYS @dickcav @upthewaterspout @pivotal-amurmann
-assembly_content.txt @dickcav @rhoughton-pivot
-dependency_classpath.txt @dickcav @rhoughton-pivot
-expected-pom.xml @dickcav @rhoughton-pivot
-
-#-----------------------------------------------------------------
-# Documentation
-#-----------------------------------------------------------------
-apache-copyright-notice.txt @upthewaterspout @pivotal-amurmann
-BUILDING.md @rhoughton-pivot @upthewaterspout
-CODE_OF_CONDUCT.md @upthewaterspout @pivotal-amurmann @nonbinaryprogrammer
-LICENSE @dickcav @onichols-pivotal
-NOTICE @dickcav @onichols-pivotal
-/README.md @upthewaterspout @pivotal-amurmann @kirklund
-#TESTING.md
diff --git a/CODEWATCHERS b/CODEWATCHERS
deleted file mode 100644
index ae1c8fc6962e..000000000000
--- a/CODEWATCHERS
+++ /dev/null
@@ -1,83 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-# This file follows the same format as CODEOWNERS, but adds you as
-# an optional reviewer rather than a required code owner reviewer.
-# Draft PRs are ignored until ~15 minutes after Ready For Review.
-# CODEWATCHERS is a bot; the bot owner will appear as the requestor.
-# You must be a Geode committer to use CODEWATCHERS.
-
-
-#-----------------------------------------------------------------
-# CODEOWNERS and .asf.yml
-#-----------------------------------------------------------------
-CODEOWNERS @onichols-pivotal @rhoughton-pivot
-CODEWATCHERS @onichols-pivotal @rhoughton-pivot
-COMMITWATCHERS @onichols-pivotal
-.asf.yaml @onichols-pivotal @rhoughton-pivot
-
-
-#-----------------------------------------------------------------
-# Documentation
-#-----------------------------------------------------------------
-geode-book/** @davebarnes97
-geode-docs/** @davebarnes97
-geode-book/config.yml @onichols-pivotal
-geode-book/redirects.rb @onichols-pivotal
-LICENSE @metatype
-NOTICE @metatype
-
-#-----------------------------------------------------------------
-# Jar Deployment
-#-----------------------------------------------------------------
-geode-core/**/org/apache/geode/**/classloader/** @kohlmu-pivotal
-geode-core/**/org/apache/geode/**/deployment/** @kohlmu-pivotal
-geode-deployment/** @kohlmu-pivotal
-geode-core/**/org/apache/geode/cache/internal/execute/* @kohlmu-pivotal
-
-#-----------------------------------------------------------------
-# Client/server messaging and cache operations
-#-----------------------------------------------------------------
-geode-core/**/org/apache/geode/cache/client/** @albertogpz
-geode-core/**/org/apache/geode/cache/server/** @albertogpz
-geode-core/**/org/apache/geode/internal/cache/tier/** @albertogpz
-
-#-----------------------------------------------------------------
-# WAN messaging and queues
-#-----------------------------------------------------------------
-geode-wan/** @albertogpz
-geode-core/**/org/apache/geode/cache/asyncqueue/** @albertogpz
-geode-core/**/org/apache/geode/cache/wan/** @albertogpz
-geode-core/**/org/apache/geode/internal/cache/wan/** @albertogpz
-
-#-----------------------------------------------------------------
-# Metrics & Statistics
-#-----------------------------------------------------------------
-geode-core/**/org/apache/geode/internal/statistics/** @mkevo
-geode-core/**/org/apache/geode/internal/stats50/** @mkevo
-geode-core/**/org/apache/geode/metrics/** @mkevo
-
-#-----------------------------------------------------------------
-# Querying
-#-----------------------------------------------------------------
-geode-cq/** @mkevo
-geode-core/**/org/apache/geode/cache/query/** @mkevo
-
-#-----------------------------------------------------------------
-# Build and tooling
-#-----------------------------------------------------------------
-dev-tools/progress/** @demery-pivotal
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
deleted file mode 100644
index 3a332486caab..000000000000
--- a/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,7 +0,0 @@
-# Code of Conduct
-
-* [Code of Conduct for The Apache Software Foundation][1]
-* [Code of Conduct for the Geode Project][2]
-
-[1]: https://www.apache.org/foundation/policies/conduct.html
-[2]: https://cwiki.apache.org/confluence/display/GEODE/Code+of+Conduct
diff --git a/COMMITWATCHERS b/COMMITWATCHERS
deleted file mode 100644
index 1dc898c2ac5c..000000000000
--- a/COMMITWATCHERS
+++ /dev/null
@@ -1,66 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-# Add your github username to one or both sections below to opt-in for
-# automated feedback on your commit message.
-
-[Draft]
-ezoerner
-
-[Non-Draft]
-kirklund
-ezoerner
-kohlmu-pivotal
-
-
-# By opting-in, the commit message of the first commit in your PR will
-# be compared to the guidelines in
-# https://cwiki.apache.org/confluence/display/GEODE/Commit+Message+Format
-# and a comment will be added to your PR if improvements are recommended.
-#
-# Please note that these guidelines are totally optional. What matters
-# most is not formatting, but including enough detail for future
-# contributors to understand what you changed and why.
-#
-# Q. Why is this opt-in? Wouldn't this be good feedback for all PRs?
-# A. The Geode community embraces diversity of opinions. Rather than
-# rules, "we like to work on trust, not unnecessary restrictions".
-#
-# Q. Why is only my first commit message inspected?
-# A. Because it is most likely to be used as the actual commit message
-# or the start of the squash commit message when your PR is merged.
-#
-# Q. Isn't this redundant with the PR title and description in github?
-# A. It can be; some contributors copy&paste their commit message
-# there as well. Or you can use that space for notes to reviewers,
-# such as how you tested or specific feedback you'd like.
-#
-# Q. How do I push changes to my commit message?
-# A. Using interactive rebase (git rebase -i HEAD~n, where n is the
-# number of commits in your PR so far), change "pick" to "r" to
-# reword the first commit, then git push --force.
-#
-# Q. Will a force push mess up reviews I've already received?
-# A. Yes. Opt-in your draft PRs too to get feedback (and have a chance
-# to make fixes) prior to marking your PR as ready for review.
-#
-# Q. Can I just write or fix my commit message when I merge my PR?
-# A. If you're a committer and if you remember to, sure, although this
-# will deprive you of review feedback on your actual commit message.
-#
-# Q. Can I update my commit message after my PR is merged?
-# A. No, Geode's branch protection disallows force push on develop.
diff --git a/README.md b/README.md
index 967acd2c8d24..f4ed990b67b8 100644
--- a/README.md
+++ b/README.md
@@ -1,246 +1,7 @@
-## Contents
-1. [Overview](#overview)
-1. [How to Get Apache Geode](#obtaining)
-1. [Main Concepts and Components](#concepts)
-1. [Location of Directions for Building from Source](#building)
-1. [Geode in 5 minutes](#started)
-1. [Application Development](#development)
-1. [Documentation](https://geode.apache.org/docs/)
-1. [Wiki](https://cwiki.apache.org/confluence/display/GEODE/Index)
-1. [How to Contribute](https://cwiki.apache.org/confluence/display/GEODE/How+to+Contribute)
-1. [Export Control](#export)
-
-## Overview
-
-[Apache Geode](http://geode.apache.org/) is
-a data management platform that provides real-time, consistent access to
-data-intensive applications throughout widely distributed cloud architectures.
-
-Apache Geode pools memory, CPU, network resources, and optionally local disk
-across multiple processes to manage application objects and behavior. It uses
-dynamic replication and data partitioning techniques to implement high
-availability, improved performance, scalability, and fault tolerance. In
-addition to being a distributed data container, Apache Geode is an in-memory
-data management system that provides reliable asynchronous event notifications
-and guaranteed message delivery.
-
-Apache Geode is a mature, robust technology originally developed by GemStone
-Systems. Commercially available as GemFire™, it was first deployed in the
-financial sector as the transactional, low-latency data engine used in Wall
-Street trading platforms. Today Apache Geode technology is used by hundreds of
-enterprise customers for high-scale business applications that must meet low
-latency and 24x7 availability requirements.
-
-## How to Get Apache Geode
-
-You can download Apache Geode from the
-[website](https://geode.apache.org/releases/), run a Docker
-[image](https://hub.docker.com/r/apachegeode/geode/), or install with
-[Homebrew](https://formulae.brew.sh/formula/apache-geode) on OSX. Application developers
-can load dependencies from [Maven
-Central](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.apache.geode%22).
-
-Maven
-```xml
-
-
- org.apache.geode
- geode-core
- $VERSION
-
-
-```
-
-Gradle
-```groovy
-dependencies {
- compile "org.apache.geode:geode-core:$VERSION"
-}
-```
-
-## Main Concepts and Components
-
-_Caches_ are an abstraction that describe a node in an Apache Geode distributed
-system.
-
-Within each cache, you define data _regions_. Data regions are analogous to
-tables in a relational database and manage data in a distributed fashion as
-name/value pairs. A _replicated_ region stores identical copies of the data on
-each cache member of a distributed system. A _partitioned_ region spreads the
-data among cache members. After the system is configured, client applications
-can access the distributed data in regions without knowledge of the underlying
-system architecture. You can define listeners to receive notifications when
-data has changed, and you can define expiration criteria to delete obsolete
-data in a region.
-
-_Locators_ provide clients with both discovery and server load balancing
-services. Clients are configured with locator information, and the locators
-maintain a dynamic list of member servers. The locators provide clients with
-connection information to a server.
-
-Apache Geode includes the following features:
-
-* Combines redundancy, replication, and a "shared nothing" persistence
- architecture to deliver fail-safe reliability and performance.
-* Horizontally scalable to thousands of cache members, with multiple cache
- topologies to meet different enterprise needs. The cache can be
- distributed across multiple computers.
-* Asynchronous and synchronous cache update propagation.
-* Delta propagation distributes only the difference between old and new
- versions of an object (delta) instead of the entire object, resulting in
- significant distribution cost savings.
-* Reliable asynchronous event notifications and guaranteed message delivery
- through optimized, low latency distribution layer.
-* Data awareness and real-time business intelligence. If data changes as
- you retrieve it, you see the changes immediately.
-* Integration with Spring Framework to speed and simplify the development
- of scalable, transactional enterprise applications.
-* JTA compliant transaction support.
-* Cluster-wide configurations that can be persisted and exported to other
- clusters.
-* Remote cluster management through HTTP.
-* REST APIs for REST-enabled application development.
-* Rolling upgrades may be possible, but they will be subject to any
- limitations imposed by new features.
-
-## Building this Release from Source
-
-See [BUILDING.md](./BUILDING.md) for
-instructions on how to build the project.
-
-## Running Tests
-See [TESTING.md](./TESTING.md) for
-instructions on how to run tests.
-
-## Geode in 5 minutes
-
-Geode requires installation of JDK version 1.8. After installing Apache Geode,
-start a locator and server:
-```console
-$ gfsh
-gfsh> start locator
-gfsh> start server
-```
-
-Create a region:
-```console
-gfsh> create region --name=hello --type=REPLICATE
-```
-
-Write a client application (this example uses a [Gradle](https://gradle.org)
-build script):
-
-_build.gradle_
-```groovy
-apply plugin: 'java'
-apply plugin: 'application'
-
-mainClassName = 'HelloWorld'
-
-repositories { mavenCentral() }
-dependencies {
- compile 'org.apache.geode:geode-core:1.4.0'
- runtime 'org.slf4j:slf4j-log4j12:1.7.24'
-}
-```
-
-_src/main/java/HelloWorld.java_
-```java
-import java.util.Map;
-import org.apache.geode.cache.Region;
-import org.apache.geode.cache.client.*;
-
-public class HelloWorld {
- public static void main(String[] args) throws Exception {
- ClientCache cache = new ClientCacheFactory()
- .addPoolLocator("localhost", 10334)
- .create();
- Region region = cache
- .createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY)
- .create("hello");
-
- region.put("1", "Hello");
- region.put("2", "World");
-
- for (Map.Entry entry : region.entrySet()) {
- System.out.format("key = %s, value = %s\n", entry.getKey(), entry.getValue());
- }
- cache.close();
- }
-}
-```
-
-Build and run the `HelloWorld` example:
-```console
-$ gradle run
-```
-
-The application will connect to the running cluster, create a local cache, put
-some data in the cache, and print the cached data to the console:
-```console
-key = 1, value = Hello
-key = 2, value = World
-```
-
-Finally, shutdown the Geode server and locator:
-```console
-gfsh> shutdown --include-locators=true
-```
-
-For more information see the [Geode
-Examples](https://github.com/apache/geode-examples) repository or the
-[documentation](https://geode.apache.org/docs/).
-
-## Application Development
-
-Apache Geode applications can be written in these client technologies:
-
-* Java [client](https://geode.apache.org/docs/guide/18/topologies_and_comm/cs_configuration/chapter_overview.html)
- or [peer](https://geode.apache.org/docs/guide/18/topologies_and_comm/p2p_configuration/chapter_overview.html)
-* [REST](https://geode.apache.org/docs/guide/18/rest_apps/chapter_overview.html)
-* [Memcached](https://cwiki.apache.org/confluence/display/GEODE/Moving+from+memcached+to+gemcached)
-
-The following libraries are available external to the Apache Geode project:
-
-* [Spring Data GemFire](https://projects.spring.io/spring-data-gemfire/)
-* [Spring Cache](https://docs.spring.io/spring/docs/current/spring-framework-reference/html/cache.html)
-* [Python](https://github.com/gemfire/py-gemfire-rest)
-
-## Export Control
-
-This distribution includes cryptographic software.
-The country in which you currently reside may have restrictions
-on the import, possession, use, and/or re-export to another country,
-of encryption software. BEFORE using any encryption software,
-please check your country's laws, regulations and policies
-concerning the import, possession, or use, and re-export of
-encryption software, to see if this is permitted.
-See for more information.
-
-The U.S. Government Department of Commerce, Bureau of Industry and Security (BIS),
-has classified this software as Export Commodity Control Number (ECCN) 5D002.C.1,
-which includes information security software using or performing
-cryptographic functions with asymmetric algorithms.
-The form and manner of this Apache Software Foundation distribution makes
-it eligible for export under the License Exception
-ENC Technology Software Unrestricted (TSU) exception
-(see the BIS Export Administration Regulations, Section 740.13)
-for both object code and source code.
-
-The following provides more details on the included cryptographic software:
-
-* Apache Geode is designed to be used with
- [Java Secure Socket Extension](https://docs.oracle.com/javase/8/docs/technotes/guides/security/jsse/JSSERefGuide.html) (JSSE) and
- [Java Cryptography Extension](https://docs.oracle.com/javase/8/docs/technotes/guides/security/crypto/CryptoSpec.html) (JCE).
- The [JCE Unlimited Strength Jurisdiction Policy](https://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html)
- may need to be installed separately to use keystore passwords with 7 or more characters.
-* Apache Geode links to and uses [OpenSSL](https://www.openssl.org/) ciphers.
-
+VMware GemFire can be obtained from [Tanzu Network](https://network.tanzu.vmware.com/products/pivotal-gemfire/).
diff --git a/boms/geode-all-bom/src/test/resources/expected-pom.xml b/boms/geode-all-bom/src/test/resources/expected-pom.xml
index 039b86776024..5b143243ac15 100644
--- a/boms/geode-all-bom/src/test/resources/expected-pom.xml
+++ b/boms/geode-all-bom/src/test/resources/expected-pom.xml
@@ -17,7 +17,7 @@
limitations under the License.
-->
4.0.0
- org.apache.geode
+ com.vmware.gemfiregeode-all-bom${version}pom
@@ -330,7 +330,7 @@
org.apache.shiroshiro-core
- 1.9.0
+ 1.9.1org.assertj
@@ -415,7 +415,7 @@
org.slf4jslf4j-api
- 1.7.32
+ 1.7.36org.springframework.hateoas
@@ -733,199 +733,199 @@
23.0.0
- org.apache.geode
+ com.vmware.gemfiregeode-common${version}compile
- org.apache.geode
+ com.vmware.gemfiregeode-concurrency-test${version}compile
- org.apache.geode
+ com.vmware.gemfiregeode-connectors${version}compile
- org.apache.geode
+ com.vmware.gemfiregeode-core${version}compile
- org.apache.geode
+ com.vmware.gemfiregeode-cq${version}compile
- org.apache.geode
+ com.vmware.gemfiregeode-dunit${version}compile
- org.apache.geode
+ com.vmware.gemfiregeode-gfsh${version}compile
- org.apache.geode
+ com.vmware.gemfiregeode-http-service${version}compile
- org.apache.geode
+ com.vmware.gemfiregeode-jmh${version}compile
- org.apache.geode
+ com.vmware.gemfiregeode-junit${version}compile
- org.apache.geode
+ com.vmware.gemfiregeode-log4j${version}compile
- org.apache.geode
+ com.vmware.gemfiregeode-logging${version}compile
- org.apache.geode
+ com.vmware.gemfiregeode-lucene${version}compile
- org.apache.geode
+ com.vmware.gemfiregeode-management${version}compile
- org.apache.geode
+ com.vmware.gemfiregeode-membership${version}compile
- org.apache.geode
+ com.vmware.gemfiregeode-memcached${version}compile
- org.apache.geode
+ com.vmware.gemfiregeode-old-client-support${version}compile
- org.apache.geode
+ com.vmware.gemfiregeode-pulse${version}compile
- org.apache.geode
+ com.vmware.gemfiregeode-rebalancer${version}compile
- org.apache.geode
+ com.vmware.gemfiregeode-serialization${version}compile
- org.apache.geode
+ com.vmware.gemfiregeode-server-all${version}compile
- org.apache.geode
+ com.vmware.gemfiregeode-tcp-server${version}compile
- org.apache.geode
+ com.vmware.gemfiregeode-unsafe${version}compile
- org.apache.geode
+ com.vmware.gemfiregeode-wan${version}compile
- org.apache.geode
+ com.vmware.gemfiregeode-web${version}compile
- org.apache.geode
+ com.vmware.gemfiregeode-web-api${version}compile
- org.apache.geode
+ com.vmware.gemfiregeode-web-management${version}compile
- org.apache.geode
+ com.vmware.gemfiregeode-modules${version}compile
- org.apache.geode
+ com.vmware.gemfiregeode-modules-tomcat8${version}compile
- org.apache.geode
+ com.vmware.gemfiregeode-modules-tomcat9${version}compile
- org.apache.geode
+ com.vmware.gemfiregeode-deployment-legacy${version}compile
- org.apache.geode
+ com.vmware.gemfiregeode-lucene-test${version}compile
- org.apache.geode
+ com.vmware.gemfiregeode-pulse-test${version}compile
diff --git a/boms/geode-client-bom/src/test/resources/expected-pom.xml b/boms/geode-client-bom/src/test/resources/expected-pom.xml
index 2fa63c24ee5d..38d7460099c0 100644
--- a/boms/geode-client-bom/src/test/resources/expected-pom.xml
+++ b/boms/geode-client-bom/src/test/resources/expected-pom.xml
@@ -17,7 +17,7 @@
limitations under the License.
-->
4.0.0
- org.apache.geode
+ com.vmware.gemfiregeode-client-bom${version}pom
@@ -38,7 +38,7 @@
- org.apache.geode
+ com.vmware.gemfiregeode-core${version}
@@ -53,7 +53,7 @@
- org.apache.geode
+ com.vmware.gemfiregeode-cq${version}
diff --git a/build-tools/geode-dependency-management/src/main/groovy/org/apache/geode/gradle/plugins/DependencyConstraints.groovy b/build-tools/geode-dependency-management/src/main/groovy/org/apache/geode/gradle/plugins/DependencyConstraints.groovy
index 2a3ed0143602..a2a429608eb1 100644
--- a/build-tools/geode-dependency-management/src/main/groovy/org/apache/geode/gradle/plugins/DependencyConstraints.groovy
+++ b/build-tools/geode-dependency-management/src/main/groovy/org/apache/geode/gradle/plugins/DependencyConstraints.groovy
@@ -41,8 +41,8 @@ class DependencyConstraints {
deps.put("jgroups.version", "3.6.14.Final")
deps.put("log4j.version", "2.17.2")
deps.put("micrometer.version", "1.9.1")
- deps.put("shiro.version", "1.9.0")
- deps.put("slf4j-api.version", "1.7.32")
+ deps.put("shiro.version", "1.9.1")
+ deps.put("slf4j-api.version", "1.7.36")
deps.put("jboss-modules.version", "1.11.0.Final")
deps.put("jackson.version", "2.13.3")
deps.put("jackson.databind.version", "2.13.3")
@@ -54,8 +54,6 @@ class DependencyConstraints {
// in geode-assembly.gradle. Moreover, dependencyManagement does not seem to play nicely when
// specifying @zip in a dependency, the manner in which we consume them in custom configurations.
// This would possibly be corrected if they were proper source sets.
- deps.put("tomcat6.version", "6.0.37")
- deps.put("tomcat7.version", "7.0.109")
deps.put("tomcat8.version", "8.5.66")
deps.put("tomcat9.version", "9.0.62")
diff --git a/build-tools/scripts/src/main/groovy/check-pom.gradle b/build-tools/scripts/src/main/groovy/check-pom.gradle
index d73492f3a805..ec9a5eadf3b3 100644
--- a/build-tools/scripts/src/main/groovy/check-pom.gradle
+++ b/build-tools/scripts/src/main/groovy/check-pom.gradle
@@ -36,10 +36,10 @@ tasks.register('checkPom') {
// We impose the following rules on our produced poms:
// * Versions are to be specified in the block, not the block
- // * org.apache.geode versions will be ignored, in favor of this build's version
+ // * com.vmware.gemfire versions will be ignored, in favor of this build's version
// * blocks in produced POMs are as expected (ordering ignored)
// * blocks in produced POMs are as expected (ordering ignored)
- // * Published groupId = "org.apache.geode"
+ // * Published groupId = "com.vmware.gemfire"
// * Published artifactId = project.artifactName if it exists, else project.name
def anyVersionDefinitionNotInDependencyManagement = { pom ->
@@ -50,7 +50,7 @@ tasks.register('checkPom') {
def ignoreGeodeVersionInExpectedPom = { pom ->
pom.dependencyManagement.dependencies.dependency.each { dep ->
- if (dep.toString().contains("org.apache.geode")) {
+ if (dep.toString().contains("com.vmware.gemfire")) {
// since the project version is the source of truth, use that for comparison instead of
// whatever is stored in the expected pom file
dep.get("version")*.setValue([version])
@@ -94,7 +94,7 @@ tasks.register('checkPom') {
if (pathologicalArtifactId || pathologicalGroupId || pathologicalVersionedDeps) {
def errorSummary = ""
errorSummary += pathologicalArtifactId ? "Expected POM header pathologically incorrect. Fix artifactId to match subproject name.\n" : ""
- errorSummary += pathologicalGroupId ? "Expected POM header pathologically incorrect. Fix groupId to be 'org.apache.geode'.\n" : ""
+ errorSummary += pathologicalGroupId ? "Expected POM header pathologically incorrect. Fix groupId to be 'com.vmware.gemfire'.\n" : ""
errorSummary += pathologicalVersionedDeps ? "Expected POM should not declare dependency versions outside the Spring dependency-management constraints." : ""
throw new GradleException(errorSummary)
}
@@ -158,7 +158,7 @@ tasks.register('updateExpectedPom', Copy) {
doLast {
def checkGroupIdAndSetVersion = { elem ->
- if (elem.groupId.text().contains("org.apache.geode")) {
+ if (elem.groupId.text().contains("com.vmware.gemfire")) {
elem.get("version")*.setValue('${version}')
}
}
diff --git a/build-tools/scripts/src/main/groovy/geode-publish-common.gradle b/build-tools/scripts/src/main/groovy/geode-publish-common.gradle
index fc78d2acc7c8..13f43131a27a 100644
--- a/build-tools/scripts/src/main/groovy/geode-publish-common.gradle
+++ b/build-tools/scripts/src/main/groovy/geode-publish-common.gradle
@@ -66,7 +66,7 @@ publishing {
// Spring dependency-management plugin. We remove version specification as injected by
// project dependencies, e.g., compile project(':geode-core')
asNode().dependencies.dependency.each { dep ->
- if (dep.toString().contains("org.apache.geode")) {
+ if (dep.toString().contains("com.vmware.gemfire")) {
dep.remove(dep["version"])
}
}
diff --git a/build-tools/scripts/src/main/groovy/geode-rat.gradle b/build-tools/scripts/src/main/groovy/geode-rat.gradle
index dca43213de10..083d1b869c8e 100644
--- a/build-tools/scripts/src/main/groovy/geode-rat.gradle
+++ b/build-tools/scripts/src/main/groovy/geode-rat.gradle
@@ -23,6 +23,10 @@ plugins {
rat {
inputDir = rootDir
+ substringMatcher("VMware", "VMware", "VMware, Inc.", "vmware-eula")
+ approvedLicense("VMware")
+ approvedLicense("Apache License Version 2.0")
+
excludes = [
// git
'.git/**',
@@ -48,9 +52,9 @@ rat {
'**/go.sum',
// Geode examples
- 'geode-examples/.idea/**',
- 'geode-examples/gradlew*/**',
- 'geode-examples/gradle/wrapper/**',
+ 'gemfire-examples/.idea/**',
+ 'gemfire-examples/gradlew*/**',
+ 'gemfire-examples/gradle/wrapper/**',
// IDE
'etc/eclipse-java-google-style.xml',
@@ -134,27 +138,9 @@ rat {
// Public Domain http://meyerweb.com/eric/tools/css/reset/
'geode-pulse/src/main/webapp/scripts/lib/tooltip.js',
- // JSON License - permissive, used for Good, not Evil
- 'geode-json/src/main/java/org/json/CDL.java',
- 'geode-json/src/main/java/org/json/Cookie.java',
- 'geode-json/src/main/java/org/json/CookieList.java',
- 'geode-json/src/main/java/org/json/CDL.java',
- 'geode-json/src/main/java/org/json/Cookie.java',
- 'geode-json/src/main/java/org/json/CookieList.java',
- 'geode-json/src/main/java/org/json/HTTP.java',
- 'geode-json/src/main/java/org/json/HTTPTokener.java',
- 'geode-json/src/main/java/org/json/JSONArray.java',
- 'geode-json/src/main/java/org/json/JSONException.java',
- 'geode-json/src/main/java/org/json/JSONML.java',
- 'geode-json/src/main/java/org/json/JSONObject.java',
- 'geode-json/src/main/java/org/json/JSONString.java',
- 'geode-json/src/main/java/org/json/JSONStringer.java',
- 'geode-json/src/main/java/org/json/JSONTokener.java',
- 'geode-json/src/main/java/org/json/JSONWriter.java',
- 'geode-json/src/main/java/org/json/XML.java',
- 'geode-json/src/main/java/org/json/XMLTokener.java',
-
// MIT License
+ 'geode-pulse/src/main/webapp/scripts/lib/jit.js',
+ 'geode-pulse/src/main/webapp/scripts/lib/split.js',
'geode-pulse/src/main/webapp/scripts/lib/jquery.jqGrid.src.js',
'geode-pulse/src/main/webapp/scripts/lib/grid.locale-en.js',
'geode-pulse/src/main/webapp/scripts/lib/html5.js',
diff --git a/build-tools/scripts/src/main/groovy/geode-test.gradle b/build-tools/scripts/src/main/groovy/geode-test.gradle
index 93488986e512..f33ce74535b3 100644
--- a/build-tools/scripts/src/main/groovy/geode-test.gradle
+++ b/build-tools/scripts/src/main/groovy/geode-test.gradle
@@ -181,83 +181,23 @@ gradle.taskGraph.whenReady({ graph ->
jvmArgs += ['-XX:+HeapDumpOnOutOfMemoryError', '-ea']
if (project.hasProperty('testJVMVer') && testJVMVer.toInteger() >= 9) {
jvmArgs += [
- "--add-opens=java.base/java.io=ALL-UNNAMED",
+ // Product: BufferPool uses DirectBuffer
+ "--add-exports=java.base/sun.nio.ch=ALL-UNNAMED",
+ // Tests: CertificateBuilder uses numerous types declared here
+ "--add-exports=java.base/sun.security.x509=ALL-UNNAMED",
+ // Product: ManagementAgent's custom MBean servers extend types declared here
+ "--add-exports=java.management/com.sun.jmx.remote.security=ALL-UNNAMED",
+
+ // Product: UnsafeThreadLocal accesses fields and methods of ThreadLocal
"--add-opens=java.base/java.lang=ALL-UNNAMED",
- "--add-opens=java.base/java.lang.annotation=ALL-UNNAMED",
- "--add-opens=java.base/java.lang.module=ALL-UNNAMED",
- "--add-opens=java.base/java.lang.ref=ALL-UNNAMED",
- "--add-opens=java.base/java.lang.reflect=ALL-UNNAMED",
- "--add-opens=java.base/java.math=ALL-UNNAMED",
- "--add-opens=java.base/java.net=ALL-UNNAMED",
+ // Product: AddressableMemoryManager accesses DirectByteBuffer constructor
"--add-opens=java.base/java.nio=ALL-UNNAMED",
- "--add-opens=java.base/java.nio.channels=ALL-UNNAMED",
- "--add-opens=java.base/java.nio.channels.spi=ALL-UNNAMED",
- "--add-opens=java.base/java.nio.charset=ALL-UNNAMED",
- "--add-opens=java.base/java.nio.file.attribute=ALL-UNNAMED",
- "--add-opens=java.base/java.nio.file.spi=ALL-UNNAMED",
- "--add-opens=java.base/java.security=ALL-UNNAMED",
- "--add-opens=java.base/java.text=ALL-UNNAMED",
- "--add-opens=java.base/java.time=ALL-UNNAMED",
- "--add-opens=java.base/java.time.chrono=ALL-UNNAMED",
- "--add-opens=java.base/java.time.format=ALL-UNNAMED",
- "--add-opens=java.base/java.time.temporal=ALL-UNNAMED",
- "--add-opens=java.base/java.time.zone=ALL-UNNAMED",
+ // Tests: EnvironmentVariables rule accesses Collections$UnmodifiableMap.m
"--add-opens=java.base/java.util=ALL-UNNAMED",
- "--add-opens=java.base/java.util.concurrent=ALL-UNNAMED",
- "--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED",
- "--add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED",
- "--add-opens=java.base/java.util.jar=ALL-UNNAMED",
- "--add-opens=java.base/java.util.regex=ALL-UNNAMED",
- "--add-opens=java.base/java.util.zip=ALL-UNNAMED",
- "--add-opens=java.base/javax.net.ssl=ALL-UNNAMED",
- "--add-opens=java.base/jdk.internal.loader=ALL-UNNAMED",
- "--add-opens=java.base/jdk.internal.misc=ALL-UNNAMED",
- "--add-opens=java.base/jdk.internal.module=ALL-UNNAMED",
- "--add-opens=java.base/jdk.internal.platform=ALL-UNNAMED",
- "--add-opens=java.base/jdk.internal.ref=ALL-UNNAMED",
- "--add-opens=java.base/jdk.internal.reflect=ALL-UNNAMED",
- "--add-opens=java.base/jdk.internal.util.jar=ALL-UNNAMED",
- "--add-opens=java.base/sun.reflect.annotation=ALL-UNNAMED",
- "--add-opens=java.base/sun.reflect.generics.factory=ALL-UNNAMED",
- "--add-opens=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED",
- "--add-opens=java.base/sun.reflect.generics.repository=ALL-UNNAMED",
- "--add-opens=java.base/sun.reflect.generics.scope=ALL-UNNAMED",
- "--add-opens=java.base/sun.reflect.generics.tree=ALL-UNNAMED",
- "--add-opens=java.base/sun.net.www=ALL-UNNAMED",
- "--add-opens=java.base/sun.net.www.protocol.file=ALL-UNNAMED",
- "--add-opens=java.base/sun.net.www.protocol.jar=ALL-UNNAMED",
- "--add-opens=java.base/sun.nio.ch=ALL-UNNAMED",
- "--add-opens=java.base/sun.nio.cs=ALL-UNNAMED",
- "--add-opens=java.base/sun.nio.fs=ALL-UNNAMED",
- "--add-opens=java.base/sun.reflect.generics.factory=ALL-UNNAMED",
- "--add-opens=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED",
- "--add-opens=java.base/sun.reflect.generics.repository=ALL-UNNAMED",
- "--add-opens=java.base/sun.reflect.generics.scope=ALL-UNNAMED",
- "--add-opens=java.base/sun.reflect.generics.tree=ALL-UNNAMED",
- "--add-opens=java.base/sun.security.provider=ALL-UNNAMED",
+ // Tests: SecurityTestUtils resets SSL-related fields
"--add-opens=java.base/sun.security.ssl=ALL-UNNAMED",
- "--add-opens=java.base/sun.security.util=ALL-UNNAMED",
- "--add-opens=java.base/sun.util.calendar=ALL-UNNAMED",
- "--add-opens=java.base/sun.util.locale=ALL-UNNAMED",
- "--add-opens=java.logging/java.util.logging=ALL-UNNAMED",
- "--add-opens=java.management/javax.management=ALL-UNNAMED",
- "--add-opens=java.management/javax.management.openmbean=ALL-UNNAMED",
- "--add-opens=java.management/sun.management=ALL-UNNAMED",
- "--add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED",
- "--add-opens=java.xml/jdk.xml.internal=ALL-UNNAMED",
- "--add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED",
-
- "--add-exports=java.base/sun.security.x509=ALL-UNNAMED",
- "--add-exports=java.management/com.sun.jmx.remote.security=ALL-UNNAMED",
+ "--add-opens=java.base/javax.net.ssl=ALL-UNNAMED",
]
-
- if (System.getProperty("os.name").startsWith('Linux')) {
- jvmArgs += "--add-opens=java.base/jdk.internal.platform=ALL-UNNAMED"
- jvmArgs += "--add-opens=java.base/jdk.internal.platform.cgroupv1=ALL-UNNAMED"
- }
- if(testJVMVer.toInteger() >= 17) {
- jvmArgs += "--add-exports=java.base/jdk.internal.util.random=ALL-UNNAMED"
- }
}
if (project.hasProperty('testJVM') && !testJVM.trim().isEmpty()) {
executable = "${testJVM}/bin/java"
diff --git a/ci/pipelines/examples/jinja.template.yml b/ci/pipelines/examples/jinja.template.yml
index b5e33ce45cf1..f545305462d7 100644
--- a/ci/pipelines/examples/jinja.template.yml
+++ b/ci/pipelines/examples/jinja.template.yml
@@ -80,20 +80,22 @@ resources:
bucket: ((artifact-bucket))
json_key: ((concourse-gcp-key))
versioned_file: semvers/((pipeline-prefix))((geode-build-branch))/passing-build-tokens.json
-- name: geode-examples
+- name: gemfire-examples
icon: github-circle
type: git
source:
- uri: https://github.com/{{repository.fork}}/geode-examples.git
+ uri: git@github.com:{{repository.fork}}/gemfire-examples.git
branch: {{ repository.branch }}
+ private_key: ((gemfire-ci-private-key))
depth: 10
- name: geode-ci
icon: github-circle
type: git
source:
depth: 1
- uri: https://github.com/{{repository.fork}}/geode.git
+ uri: git@github.com:{{repository.fork}}/geode-support.git
branch: {{ repository.branch }}
+ private_key: ((gemfire-ci-private-key))
paths:
- ci/*
- name: concourse-metadata-resource
@@ -129,7 +131,7 @@ jobs:
- get: linux-builder-image-family
- get: geode-passing-tokens
trigger: true
- - get: geode-examples
+ - get: gemfire-examples
trigger: true
- get: daily
trigger: true
@@ -167,7 +169,7 @@ jobs:
path: geode-ci/ci/scripts/rsync_code_up.sh
inputs:
- name: geode-ci
- - name: geode-examples
+ - name: gemfire-examples
path: geode
- name: instance-data
timeout: 5m
@@ -185,7 +187,7 @@ jobs:
SSHKEY_FILE="instance-data/sshkey"
SSH_OPTIONS="-i ${SSHKEY_FILE} -o ConnectionAttempts=60 -o StrictHostKeyChecking=no"
INSTANCE_IP_ADDRESS="$(cat instance-data/instance-ip-address)"
- ssh ${SSH_OPTIONS} geode@${INSTANCE_IP_ADDRESS} "set -x ; mv geode geode-examples"
+ ssh ${SSH_OPTIONS} geode@${INSTANCE_IP_ADDRESS} "set -x ; mv geode gemfire-examples"
- task: build
image: alpine-tools-image
config:
@@ -199,7 +201,7 @@ jobs:
path: geode-ci/ci/scripts/execute_build_examples.sh
inputs:
- name: geode-ci
- - name: geode-examples
+ - name: gemfire-examples
- name: geode-passing-tokens
- name: instance-data
outputs:
diff --git a/ci/pipelines/geode-build/jinja.template.yml b/ci/pipelines/geode-build/jinja.template.yml
index 59dc0fbfce64..3b929f429cab 100644
--- a/ci/pipelines/geode-build/jinja.template.yml
+++ b/ci/pipelines/geode-build/jinja.template.yml
@@ -23,8 +23,6 @@
{% macro plan_resource_gets(test) %}
- get: geode-ci
- passed:
- - build
- in_parallel:
- get: geode
trigger: true
@@ -95,9 +93,6 @@ GRADLE_GLOBAL_ARGS: ((gradle-global-args))
- {{test.name}}-test-{{java_test_version.name}}
{%- endfor -%}
{%- endfor -%}
- {%- for run_var in (benchmarks.flavors) %}
-- benchmark-{{ run_var.title }}
- {%- endfor -%}
{% endmacro %}
groups:
@@ -183,7 +178,8 @@ resources:
source:
branch: {{benchmarks.benchmark_branch}}
depth: 1
- uri: https://github.com/((geode-fork))/geode-benchmarks.git
+ private_key: ((gemfire-ci-private-key))
+ uri: git@github.com:gemfire/gemfire-benchmarks.git
- name: geode-build-version
type: semver
source:
@@ -443,26 +439,24 @@ jobs:
args:
- -cx
- |
- pushd geode
- GEODE_SHA=$(git rev-parse HEAD)
- popd
GEODE_SEMVER=$(cat geode-build-version/number)
+ cd geode
+ GEODE_SHA=$(git rev-parse HEAD)
GS_PATH=gs://((artifact-bucket))/semvers/((pipeline-prefix))((geode-build-branch))/passing-build-tokens.json
CURRENT_PASSING_SHA=$(gsutil cat ${GS_PATH} | jq -r .ref)
set -e
# Check that the incoming GEODE_SHA is a descendent of the currently stored value.
# Keeps us from winding back the repository in the case of an out-of-order pipeline pass
- if [ -n "${CURRENT_PASSING_SHA}" ]; then
- cd geode
- if git merge-base --is-ancestor ${CURRENT_PASSING_SHA} ${GEODE_SHA}; then
- cat > ../geode-passing-tokens/passing-build-tokens.json < ../geode-passing-tokens/passing-build-tokens.json < ../geode-passing-tokens/passing-build-tokens.json
fi
- in_parallel:
- put: geode-passing-tokens
@@ -506,6 +500,10 @@ jobs:
TAG_POSTFIX: -{{ run_var.title }}
TEST_OPTIONS: {{ run_var.options }}
PURPOSE: ((pipeline-prefix))geode-benchmarks
+ GITHUB_CREDENTIALS: ((gemfire-ci-private-key))
+ GCP_CREDENTIALS: ((maven-access-service-account))
+ ORG_GRADLE_PROJECT_mavenUser: ((commercial-repo-username))
+ ORG_GRADLE_PROJECT_mavenPassword: ((commercial-repo-password))
run:
path: geode-ci/ci/scripts/run_benchmarks.sh
inputs:
diff --git a/ci/pipelines/images/jinja.template.yml b/ci/pipelines/images/jinja.template.yml
index dec32d3750ce..6a091dc6f70f 100644
--- a/ci/pipelines/images/jinja.template.yml
+++ b/ci/pipelines/images/jinja.template.yml
@@ -68,10 +68,11 @@ resources:
- name: geode-benchmarks-image
type: git
source:
- branch: ((geode-build-branch))
+ branch: develop
paths:
- infrastructure/scripts/aws/image
- uri: https://github.com/((geode-fork))/geode-benchmarks.git
+ uri: git@github.com:gemfire/gemfire-benchmarks.git
+ private_key: ((gemfire-ci-private-key))
- name: packer-145-image
icon: docker
diff --git a/ci/pipelines/meta/deploy_meta.sh b/ci/pipelines/meta/deploy_meta.sh
index 23b600916179..8b6ec9ad6d99 100755
--- a/ci/pipelines/meta/deploy_meta.sh
+++ b/ci/pipelines/meta/deploy_meta.sh
@@ -267,7 +267,6 @@ function enableFeature {
NAME=$1
driveToGreen $META_PIPELINE set-$NAME-pipeline
unpausePipeline ${PIPELINE_PREFIX}$NAME
- exposePipeline ${PIPELINE_PREFIX}$NAME
}
set -e
@@ -298,7 +297,6 @@ unpausePipeline ${PIPELINE_PREFIX}main
if [[ "$GEODE_FORK" == "${UPSTREAM_FORK}" ]]; then
if [[ "${PUBLIC}" == "true" ]]; then
- exposePipelines ${PIPELINE_PREFIX}main ${PIPELINE_PREFIX}images
enableFeature examples
enableFeature pr
fi
diff --git a/ci/pipelines/meta/jinja.template.yml b/ci/pipelines/meta/jinja.template.yml
index 6f1116fb8045..9fcd89a70414 100644
--- a/ci/pipelines/meta/jinja.template.yml
+++ b/ci/pipelines/meta/jinja.template.yml
@@ -70,7 +70,7 @@ resources:
password: ((docker-password))
repository: gcr.io/((gcp-project))/((sanitized-geode-fork))-((sanitized-geode-build-branch))-meta-img
{% if repository.fork == repository.upstream_fork %}
-- name: geode-examples-pipeline
+- name: gemfire-examples-pipeline
type: git
source:
{{ github_access() | indent(4) }}
@@ -174,7 +174,7 @@ jobs:
serial: true
public: ((public-pipelines))
plan:
- - get: geode-examples-pipeline
+ - get: gemfire-examples-pipeline
trigger: true
- get: meta-mini-image
trigger: true
@@ -184,7 +184,7 @@ jobs:
config:
platform: linux
inputs:
- - name: geode-examples-pipeline
+ - name: gemfire-examples-pipeline
outputs:
- name: results
params:
@@ -203,7 +203,7 @@ jobs:
MAVEN_SNAPSHOT_BUCKET: ((maven-snapshot-bucket))
SEMVER_PRERELEASE_TOKEN: ((semver-prerelease-token))
run:
- path: geode-examples-pipeline/ci/pipelines/examples/deploy_pipeline.sh
+ path: gemfire-examples-pipeline/ci/pipelines/examples/deploy_pipeline.sh
- set_pipeline: ((pipeline-prefix))examples
file: results/generated-pipeline.yml
var_files:
diff --git a/ci/pipelines/meta/meta.properties b/ci/pipelines/meta/meta.properties
index cee250ad61e7..d34895a87621 100644
--- a/ci/pipelines/meta/meta.properties
+++ b/ci/pipelines/meta/meta.properties
@@ -14,15 +14,26 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-UPSTREAM_FORK=apache
-GEODE_FORK=apache
-GEODE_REPO_NAME=geode
-CONCOURSE_HOST=concourse.apachegeode-ci.info
+
+# This file lives in gemfire-assembly so that the pipeline building Geode-As-GemFire can remain
+# an otherwise-perfect mirror of Apache Geode.
+# Maven rebranding in group, version, et al is the result of pipeline variables set below.
+
+# Repository targets
+UPSTREAM_FORK=gemfire
+GEODE_FORK=gemfire
+GEODE_REPO_NAME=geode-support
+
+# Concourse things
+CONCOURSE_HOST=concourse.gemfire-ci.info
CONCOURSE_TEAM=main
-GCP_PROJECT=apachegeode-ci
-ARTIFACT_BUCKET=files.apachegeode-ci.info
-PUBLIC=true
-REPOSITORY_PUBLIC=true
-GRADLE_GLOBAL_ARGS=""
-MAVEN_SNAPSHOT_BUCKET=gcs://maven.apachegeode-ci.info/snapshots/
+PUBLIC=false
+REPOSITORY_PUBLIC=false
+CONCOURSE_SCHEME=https
SEMVER_PRERELEASE_TOKEN=build
+
+# GCS targets
+GCP_PROJECT=gemfire-dev
+ARTIFACT_BUCKET=gemfire-test-artifacts
+MAVEN_SNAPSHOT_BUCKET=gcs://gemfire-build-resources/maven/${GEODE_FORK}
+
diff --git a/ci/pipelines/pull-request/deploy_pr_pipeline.sh b/ci/pipelines/pull-request/deploy_pr_pipeline.sh
index 3f3e4f8d8b5e..82fc7adef627 100755
--- a/ci/pipelines/pull-request/deploy_pr_pipeline.sh
+++ b/ci/pipelines/pull-request/deploy_pr_pipeline.sh
@@ -76,7 +76,7 @@ pushd ${SCRIPTDIR} 2>&1 > /dev/null
cat > repository.yml < instance-data/cost-data.json
{
"pipeline": "${PIPELINE_NAME}",
diff --git a/ci/scripts/execute_build_examples.sh b/ci/scripts/execute_build_examples.sh
index e490c5ecfbf6..44f444b58e18 100755
--- a/ci/scripts/execute_build_examples.sh
+++ b/ci/scripts/execute_build_examples.sh
@@ -55,4 +55,4 @@ GRADLE_COMMAND="./gradlew \
clean runAll"
echo "${GRADLE_COMMAND}"
-ssh ${SSH_OPTIONS} geode@${INSTANCE_IP_ADDRESS} "set -x && mkdir -p tmp && cd geode-examples && ${SET_JAVA_HOME} && ${GRADLE_COMMAND}"
+ssh ${SSH_OPTIONS} geode@${INSTANCE_IP_ADDRESS} "set -x && mkdir -p tmp && cd gemfire-examples && ${SET_JAVA_HOME} && ${GRADLE_COMMAND}"
diff --git a/ci/scripts/run_benchmarks.sh b/ci/scripts/run_benchmarks.sh
index 3314bf37cdd6..c772a131de68 100755
--- a/ci/scripts/run_benchmarks.sh
+++ b/ci/scripts/run_benchmarks.sh
@@ -31,6 +31,12 @@ SCRIPTDIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
source concourse-metadata-resource/concourse_metadata
+mkdir -p ${HOME}/.ssh
+cat < ${HOME}/.ssh/config
+SendEnv ORG_GRADLE_PROJECT_mavenUser
+SendEnv ORG_GRADLE_PROJECT_mavenPassword
+EOF
+
CLUSTER_TAG="${BUILD_PIPELINE_NAME}-${BUILD_JOB_NAME}-${BUILD_NAME}-${BUILD_ID}${TAG_POSTFIX}"
RESULTS_DIR=$(pwd)/results/benchmarks-${CLUSTER_TAG}
@@ -45,14 +51,18 @@ GEODE_REPO=${GEODE_REPO:-$(cd geode && git remote get-url origin)}
BENCHMARKS_REPO=${BENCHMARKS_REPO:-$(cd geode-benchmarks && git remote get-url origin)}
BASELINE_REPO=${BASELINE_REPO:-${GEODE_REPO}}
-pushd geode
+pushd geode; GEODE_REPO=rsync:$(pwd); BASELINE_REPO=rsync:$(pwd)
GEODE_SHA=$(git rev-parse --verify HEAD)
popd
input="$(pwd)/results/failedTests"
pushd geode-benchmarks/infrastructure/scripts/aws/
-./launch_cluster.sh -t ${CLUSTER_TAG} -c ${CLUSTER_COUNT} ${PURPOSE_OPTION} --ci
+set +x
+echo "${GCP_CREDENTIALS}" > google-credentials.json
+echo "${GITHUB_CREDENTIALS}" > github-credentials.pem
+set -x
+./launch_cluster.sh -t ${CLUSTER_TAG} -c ${CLUSTER_COUNT} ${PURPOSE_OPTION} --ci --gh $(pwd)/github-credentials.pem --gc $(pwd)/google-credentials.json
# test retry loop - Check if any tests have failed. If so, overwrite the TEST_OPTIONS with only the
# failed tests. Test failures only result in an exit code of 1 when on the last iteration of loop.
diff --git a/dev-tools/dependencies/README.md b/dev-tools/dependencies/README.md
index 313d13a9a2b8..ca4505be5ef4 100644
--- a/dev-tools/dependencies/README.md
+++ b/dev-tools/dependencies/README.md
@@ -14,7 +14,6 @@ dev-tools/dependencies/bump.sh -l
Step 2: In some cases, maven suggests beta releases, which Geode should not use.
Manually search for those dependencies on mavencentral to see if there is a better choice.
Special cases:
-- tomcat6 (do not upgrade)
- tomcat (upgrade to latest patch only for each of 7, 8.5, and 9)
Step 3: Create a PR and start bumping dependencies. Push to the PR every few to run PR
diff --git a/dev-tools/dependencies/bump.sh b/dev-tools/dependencies/bump.sh
index b8931dc443f6..7b1bd4729726 100755
--- a/dev-tools/dependencies/bump.sh
+++ b/dev-tools/dependencies/bump.sh
@@ -26,7 +26,7 @@ if [ "$2" = "-l" ] ; then
find . | grep build/dependencyUpdates/report.txt | xargs rm -f
./gradlew dependencyUpdates -Drevision=release
find . | grep build/dependencyUpdates/report.txt | xargs cat \
- | grep ' -> ' | egrep -v '(Gradle|antlr|lucene|JUnitParams|docker-compose-rule|javax.servlet-api|springdoc|derby|selenium|jgroups|jmh|\[6.0.37|commons-collections|jaxb|testcontainers|gradle-tooling-api|slf4j|archunit)' \
+ | grep ' -> ' | egrep -v '(Gradle|antlr|lucene|JUnitParams|docker-compose-rule|javax.servlet-api|springdoc|derby|selenium|jgroups|jmh|\[commons-collections|jaxb|testcontainers|gradle-tooling-api|slf4j|archunit)' \
| sort -u | tr -d '][' | sed -e 's/ -> / /' -e 's#.*:#'"$0 $1"' #'
echo "cd .. ; geode/dev-tools/release/license_review.sh -v HEAD ; cd $(pwd)"
echo "#Also: manually check for newer version of plugins listed in build.gradle (search on https://plugins.gradle.org/)"
diff --git a/dev-tools/progress/README.md b/dev-tools/progress/README.md
index d9a5d9f3a39e..da91067c8366 100644
--- a/dev-tools/progress/README.md
+++ b/dev-tools/progress/README.md
@@ -140,13 +140,13 @@ The default format displays commonly useful information about each test:
Example:
```
-org.apache.geode.modules.session.catalina.Tomcat7CommitSessionValveTest.recycledResponseObjectDoesNotWrapAlreadyWrappedOutputBuffer
+org.apache.geode.modules.session.catalina.Tomcat8CommitSessionValveTest.recycledResponseObjectDoesNotWrapAlreadyWrappedOutputBuffer
Iteration: 1
Start: 2021-05-20 22:16:18.699 +0000
End: 2021-05-20 22:16:20.585 +0000
Duration: 1.886s
Status: success
-org.apache.geode.modules.session.catalina.Tomcat7CommitSessionValveTest.wrappedOutputBufferForwardsToDelegate
+org.apache.geode.modules.session.catalina.Tomcat8CommitSessionValveTest.wrappedOutputBufferForwardsToDelegate
Iteration: 1
Start: 2021-05-20 22:16:20.585 +0000
End: 2021-05-20 22:16:20.589 +0000
@@ -199,14 +199,14 @@ description:
progress -j
progress -j | jq # Use jq to pretty-print the JSON
- progress -j -c Tomcat7CommitSessionValveTest
+ progress -j -c Tomcat8CommitSessionValveTest
The output (if pretty-printed) looks like this:
```json
{
- "/path/to/geode/project/extensions/geode-modules-tomcat7/build/test/test-progress.txt": {
- "org.apache.geode.modules.session.catalina.Tomcat7CommitSessionValveTest": {
+ "/path/to/geode/project/extensions/geode-modules-tomcat8/build/test/test-progress.txt": {
+ "org.apache.geode.modules.session.catalina.Tomcat8CommitSessionValveTest": {
"recycledResponseObjectDoesNotWrapAlreadyWrappedOutputBuffer": [
{
"Iteration": 1,
diff --git a/etc/intellij-apache-copyright-notice.xml b/etc/intellij-apache-copyright-notice.xml
deleted file mode 100644
index 940ad4fd6ec0..000000000000
--- a/etc/intellij-apache-copyright-notice.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/etc/intellij-vmware-copyright-notice.xml b/etc/intellij-vmware-copyright-notice.xml
new file mode 100644
index 000000000000..41a479b51c2c
--- /dev/null
+++ b/etc/intellij-vmware-copyright-notice.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/extensions/geode-modules-assembly/build.gradle b/extensions/geode-modules-assembly/build.gradle
index 9a21957aa887..618a6ec0518d 100644
--- a/extensions/geode-modules-assembly/build.gradle
+++ b/extensions/geode-modules-assembly/build.gradle
@@ -20,7 +20,6 @@ plugins {
id 'maven-publish'
}
evaluationDependsOn(':extensions:geode-modules')
-evaluationDependsOn(':extensions:geode-modules-tomcat7')
evaluationDependsOn(':extensions:geode-modules-tomcat8')
evaluationDependsOn(':extensions:geode-modules-tomcat9')
evaluationDependsOn(':extensions:geode-modules-session')
@@ -50,7 +49,6 @@ def configureTcServerAssembly = {
// All client-server files
into('geode-cs/lib') {
from project(':extensions:geode-modules').tasks.named('jar')
- from project(':extensions:geode-modules-tomcat7').tasks.named('jar')
from project(':extensions:geode-modules-tomcat8').tasks.named('jar')
from project(':extensions:geode-modules-tomcat9').tasks.named('jar')
from configurations.slf4jDeps
@@ -88,7 +86,6 @@ def configureTcServerAssembly = {
// All peer-to-peer files
into('geode-p2p/lib') {
from project(':extensions:geode-modules').tasks.named('jar')
- from project(':extensions:geode-modules-tomcat7').tasks.named('jar')
from project(':extensions:geode-modules-tomcat8').tasks.named('jar')
from project(':extensions:geode-modules-tomcat9').tasks.named('jar')
from configurations.slf4jDeps
@@ -173,7 +170,6 @@ tasks.register('distTomcat', Zip) {
// All client-server files
into('lib') {
from project(':extensions:geode-modules').tasks.named('jar')
- from project(':extensions:geode-modules-tomcat7').tasks.named('jar')
from project(':extensions:geode-modules-tomcat8').tasks.named('jar')
from project(':extensions:geode-modules-tomcat9').tasks.named('jar')
from configurations.slf4jDeps
diff --git a/extensions/geode-modules-assembly/release/tcserver/geode-cs-tomcat-7/context-fragment.xml b/extensions/geode-modules-assembly/release/tcserver/geode-cs-tomcat-7/context-fragment.xml
deleted file mode 100644
index b7ad94e521cf..000000000000
--- a/extensions/geode-modules-assembly/release/tcserver/geode-cs-tomcat-7/context-fragment.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/extensions/geode-modules-assembly/release/tcserver/geode-cs-tomcat-8/context-fragment.xml b/extensions/geode-modules-assembly/release/tcserver/geode-cs-tomcat-8/context-fragment.xml
index c8ff83d510be..038b5ae53df6 100644
--- a/extensions/geode-modules-assembly/release/tcserver/geode-cs-tomcat-8/context-fragment.xml
+++ b/extensions/geode-modules-assembly/release/tcserver/geode-cs-tomcat-8/context-fragment.xml
@@ -1,8 +1,6 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/extensions/geode-modules-assembly/release/tcserver/geode-cs/server-fragment.xml b/extensions/geode-modules-assembly/release/tcserver/geode-cs/server-fragment.xml
deleted file mode 100644
index 2ffccf636e9b..000000000000
--- a/extensions/geode-modules-assembly/release/tcserver/geode-cs/server-fragment.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
diff --git a/extensions/geode-modules-assembly/release/tcserver/geode-p2p-tomcat-7/context-fragment.xml b/extensions/geode-modules-assembly/release/tcserver/geode-p2p-tomcat-7/context-fragment.xml
deleted file mode 100644
index 252fa8f0320a..000000000000
--- a/extensions/geode-modules-assembly/release/tcserver/geode-p2p-tomcat-7/context-fragment.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/extensions/geode-modules-assembly/release/tcserver/geode-p2p-tomcat-8/context-fragment.xml b/extensions/geode-modules-assembly/release/tcserver/geode-p2p-tomcat-8/context-fragment.xml
index 48bfcbb485c2..7db27c565700 100644
--- a/extensions/geode-modules-assembly/release/tcserver/geode-p2p-tomcat-8/context-fragment.xml
+++ b/extensions/geode-modules-assembly/release/tcserver/geode-p2p-tomcat-8/context-fragment.xml
@@ -1,8 +1,6 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/extensions/geode-modules-assembly/release/tcserver/geode-p2p/server-fragment.xml b/extensions/geode-modules-assembly/release/tcserver/geode-p2p/server-fragment.xml
deleted file mode 100644
index 478ee37478b7..000000000000
--- a/extensions/geode-modules-assembly/release/tcserver/geode-p2p/server-fragment.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
diff --git a/extensions/geode-modules-session-internal/src/main/java/org/apache/geode/modules/session/internal/filter/GemfireHttpSession.java b/extensions/geode-modules-session-internal/src/main/java/org/apache/geode/modules/session/internal/filter/GemfireHttpSession.java
index ab1256e86a06..6eccc494aff2 100644
--- a/extensions/geode-modules-session-internal/src/main/java/org/apache/geode/modules/session/internal/filter/GemfireHttpSession.java
+++ b/extensions/geode-modules-session-internal/src/main/java/org/apache/geode/modules/session/internal/filter/GemfireHttpSession.java
@@ -15,6 +15,8 @@
package org.apache.geode.modules.session.internal.filter;
+import static org.apache.geode.internal.JvmSizeUtils.memoryOverhead;
+
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.DataInput;
@@ -38,6 +40,7 @@
import org.apache.geode.Delta;
import org.apache.geode.Instantiator;
import org.apache.geode.InvalidDeltaException;
+import org.apache.geode.internal.size.Sizeable;
import org.apache.geode.modules.session.internal.filter.attributes.AbstractSessionAttributes;
import org.apache.geode.modules.session.internal.filter.attributes.SessionAttributes;
import org.apache.geode.modules.util.ClassLoaderObjectInputStream;
@@ -46,7 +49,7 @@
* Class which implements a Gemfire persisted {@code HttpSession}
*/
@SuppressWarnings("deprecation")
-public class GemfireHttpSession implements HttpSession, DataSerializable, Delta {
+public class GemfireHttpSession implements HttpSession, DataSerializable, Delta, Sizeable {
private static final transient Logger LOG =
LoggerFactory.getLogger(GemfireHttpSession.class.getName());
@@ -56,6 +59,8 @@ public class GemfireHttpSession implements HttpSession, DataSerializable, Delta
*/
private static final long serialVersionUID = 238915238964017823L;
+ private static final int MEMORY_OVERHEAD = memoryOverhead(GemfireHttpSession.class);
+
/**
* Id for the session
*/
@@ -451,4 +456,20 @@ String getJvmOwnerId() {
return null;
}
+
+ private static final int ATOMIC_BOOLEAN_SIZE = memoryOverhead(AtomicBoolean.class);
+
+ @Override
+ public int getSizeInBytes() {
+ // The 'manager' and 'context' field are not sized
+ // since they reference a shared instance.
+ int attributesSize = 0;
+ if (attributes != null) {
+ attributesSize = attributes.getSizeInBytes();
+ }
+ return MEMORY_OVERHEAD
+ + memoryOverhead(id)
+ + ATOMIC_BOOLEAN_SIZE // for the 'serialized' field
+ + attributesSize;
+ }
}
diff --git a/extensions/geode-modules-session-internal/src/main/java/org/apache/geode/modules/session/internal/filter/attributes/AbstractDeltaSessionAttributes.java b/extensions/geode-modules-session-internal/src/main/java/org/apache/geode/modules/session/internal/filter/attributes/AbstractDeltaSessionAttributes.java
index cf355579cb4c..f5a097284500 100644
--- a/extensions/geode-modules-session-internal/src/main/java/org/apache/geode/modules/session/internal/filter/attributes/AbstractDeltaSessionAttributes.java
+++ b/extensions/geode-modules-session-internal/src/main/java/org/apache/geode/modules/session/internal/filter/attributes/AbstractDeltaSessionAttributes.java
@@ -15,6 +15,8 @@
package org.apache.geode.modules.session.internal.filter.attributes;
+import static org.apache.geode.internal.JvmSizeUtils.getReferenceSize;
+
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
@@ -41,7 +43,7 @@ public abstract class AbstractDeltaSessionAttributes extends AbstractSessionAttr
/**
* This map holds the updates to attributes
*/
- protected transient Map deltas =
+ protected final transient Map deltas =
Collections.synchronizedMap(new HashMap<>());
@Override
@@ -93,4 +95,28 @@ public void fromDelta(DataInput in) throws IOException, InvalidDeltaException {
}
jvmOwnerId = in.readUTF();
}
+
+ @Override
+ public int getSizeInBytes() {
+ // Field size not accounted for here since
+ // this is done in non-abstract subclasses.
+ return deltasSizeInBytes() + super.getSizeInBytes();
+ }
+
+ /**
+ * Sizing the "deltas" map is a bit tricky.
+ * Both the key and value of the map refer
+ * to objects that are also referenced by the
+ * attributes field in our super class.
+ * But each entry's value is wrapped by a DeltaEvent
+ * so the size of that class is accounted for here.
+ * Also, the HashMap itself has overhead per entry
+ * (NODE_OVERHEAD) which accounted for here.
+ * HashMap does have extra overhead depending on its
+ * loadFactor and that is not accounted for here.
+ */
+ private int deltasSizeInBytes() {
+ return deltas.size() * (HASH_MAP_ENTRY_OVERHEAD
+ + getReferenceSize() + DeltaEvent.MEMORY_OVERHEAD);
+ }
}
diff --git a/extensions/geode-modules-session-internal/src/main/java/org/apache/geode/modules/session/internal/filter/attributes/AbstractSessionAttributes.java b/extensions/geode-modules-session-internal/src/main/java/org/apache/geode/modules/session/internal/filter/attributes/AbstractSessionAttributes.java
index d4d085e76ac1..59aa38260251 100644
--- a/extensions/geode-modules-session-internal/src/main/java/org/apache/geode/modules/session/internal/filter/attributes/AbstractSessionAttributes.java
+++ b/extensions/geode-modules-session-internal/src/main/java/org/apache/geode/modules/session/internal/filter/attributes/AbstractSessionAttributes.java
@@ -15,6 +15,10 @@
package org.apache.geode.modules.session.internal.filter.attributes;
+import static org.apache.geode.internal.JvmSizeUtils.getReferenceSize;
+import static org.apache.geode.internal.JvmSizeUtils.memoryOverhead;
+import static org.apache.geode.internal.JvmSizeUtils.roundUpSize;
+
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
@@ -27,6 +31,7 @@
import org.slf4j.LoggerFactory;
import org.apache.geode.DataSerializer;
+import org.apache.geode.cache.util.ObjectSizer;
import org.apache.geode.internal.util.BlobHelper;
import org.apache.geode.modules.session.internal.filter.GemfireHttpSession;
@@ -43,7 +48,7 @@ public abstract class AbstractSessionAttributes implements SessionAttributes {
/**
* Internal attribute store.
*/
- protected Map attributes =
+ protected final Map attributes =
Collections.synchronizedMap(new HashMap<>());
/**
@@ -204,4 +209,36 @@ public void setJvmOwnerId(String jvmId) {
public String getJvmOwnerId() {
return jvmOwnerId;
}
+
+ @Override
+ public int getSizeInBytes() {
+ // Field size not accounted for here since
+ // this is done in non-abstract subclasses.
+ // jvmOwnerId is not sized since it is a shared object
+ // session is not sized since it is a shared object
+ return attributesSizeInBytes();
+ }
+
+ private int attributesSizeInBytes() {
+ int size = 0;
+ synchronized (attributes) {
+ for (Map.Entry entry : attributes.entrySet()) {
+ size += HASH_MAP_ENTRY_OVERHEAD;
+ size += memoryOverhead(entry.getKey());
+ size += ObjectSizer.DEFAULT.sizeof(entry.getValue());
+ }
+ }
+ return size;
+ }
+
+ /**
+ * Memory overhead for a single entry in a HashMap
+ */
+ protected static final int HASH_MAP_ENTRY_OVERHEAD = getReferenceSize() // for ref to HashMap.Node
+ // the following are for the fields on HashMap.Node an internal JDK class
+ + roundUpSize(4 /* for int hash field */
+ + getReferenceSize() /* for key field */
+ + getReferenceSize() /* for value field */
+ + getReferenceSize() /* for next field */);
+
}
diff --git a/extensions/geode-modules-session-internal/src/main/java/org/apache/geode/modules/session/internal/filter/attributes/DeltaEvent.java b/extensions/geode-modules-session-internal/src/main/java/org/apache/geode/modules/session/internal/filter/attributes/DeltaEvent.java
index 4b0115dd02e2..c85e2dea49bc 100644
--- a/extensions/geode-modules-session-internal/src/main/java/org/apache/geode/modules/session/internal/filter/attributes/DeltaEvent.java
+++ b/extensions/geode-modules-session-internal/src/main/java/org/apache/geode/modules/session/internal/filter/attributes/DeltaEvent.java
@@ -15,6 +15,8 @@
package org.apache.geode.modules.session.internal.filter.attributes;
+import static org.apache.geode.internal.JvmSizeUtils.memoryOverhead;
+
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
@@ -33,6 +35,7 @@
public class DeltaEvent implements DataSerializable {
private static final Logger LOG = LoggerFactory.getLogger(DeltaEvent.class.getName());
+ public static final int MEMORY_OVERHEAD = memoryOverhead(DeltaEvent.class);
/**
* The event is either an update (true) or a remove (false)
*/
diff --git a/extensions/geode-modules-session-internal/src/main/java/org/apache/geode/modules/session/internal/filter/attributes/DeltaQueuedSessionAttributes.java b/extensions/geode-modules-session-internal/src/main/java/org/apache/geode/modules/session/internal/filter/attributes/DeltaQueuedSessionAttributes.java
index e588adcc851c..4ad738b82b73 100644
--- a/extensions/geode-modules-session-internal/src/main/java/org/apache/geode/modules/session/internal/filter/attributes/DeltaQueuedSessionAttributes.java
+++ b/extensions/geode-modules-session-internal/src/main/java/org/apache/geode/modules/session/internal/filter/attributes/DeltaQueuedSessionAttributes.java
@@ -15,6 +15,8 @@
package org.apache.geode.modules.session.internal.filter.attributes;
+import static org.apache.geode.internal.JvmSizeUtils.memoryOverhead;
+
import org.apache.geode.DataSerializable;
import org.apache.geode.Instantiator;
@@ -24,6 +26,8 @@
*/
public class DeltaQueuedSessionAttributes extends AbstractDeltaSessionAttributes {
+ private static final int MEMORY_OVERHEAD = memoryOverhead(DeltaQueuedSessionAttributes.class);
+
private Trigger trigger = Trigger.SET;
private enum Trigger {
@@ -82,4 +86,10 @@ public Object removeAttribute(String attr) {
deltas.put(attr, new DeltaEvent(false, attr, null));
return obj;
}
+
+ @Override
+ public int getSizeInBytes() {
+ return MEMORY_OVERHEAD + super.getSizeInBytes();
+ }
+
}
diff --git a/extensions/geode-modules-session-internal/src/main/java/org/apache/geode/modules/session/internal/filter/attributes/DeltaSessionAttributes.java b/extensions/geode-modules-session-internal/src/main/java/org/apache/geode/modules/session/internal/filter/attributes/DeltaSessionAttributes.java
index 3b84241f85f5..79b5bfe7bf45 100644
--- a/extensions/geode-modules-session-internal/src/main/java/org/apache/geode/modules/session/internal/filter/attributes/DeltaSessionAttributes.java
+++ b/extensions/geode-modules-session-internal/src/main/java/org/apache/geode/modules/session/internal/filter/attributes/DeltaSessionAttributes.java
@@ -15,6 +15,8 @@
package org.apache.geode.modules.session.internal.filter.attributes;
+import static org.apache.geode.internal.JvmSizeUtils.memoryOverhead;
+
import org.apache.geode.DataSerializable;
import org.apache.geode.Instantiator;
@@ -24,6 +26,8 @@
*/
public class DeltaSessionAttributes extends AbstractDeltaSessionAttributes {
+ private static final int MEMORY_OVERHEAD = memoryOverhead(DeltaSessionAttributes.class);
+
// Register ourselves for de-serialization
static {
registerInstantiator();
@@ -66,4 +70,10 @@ public Object removeAttribute(String attr) {
flush();
return obj;
}
+
+ @Override
+ public int getSizeInBytes() {
+ return MEMORY_OVERHEAD + super.getSizeInBytes();
+ }
+
}
diff --git a/extensions/geode-modules-session-internal/src/main/java/org/apache/geode/modules/session/internal/filter/attributes/SessionAttributes.java b/extensions/geode-modules-session-internal/src/main/java/org/apache/geode/modules/session/internal/filter/attributes/SessionAttributes.java
index e928eda266c1..211a9b072e5a 100644
--- a/extensions/geode-modules-session-internal/src/main/java/org/apache/geode/modules/session/internal/filter/attributes/SessionAttributes.java
+++ b/extensions/geode-modules-session-internal/src/main/java/org/apache/geode/modules/session/internal/filter/attributes/SessionAttributes.java
@@ -18,6 +18,7 @@
import java.util.Set;
import org.apache.geode.DataSerializable;
+import org.apache.geode.internal.size.Sizeable;
import org.apache.geode.modules.session.internal.filter.GemfireHttpSession;
/**
@@ -25,7 +26,7 @@
* in the session which needs to be propagated for caching - as such it also includes other
* 'attributes' such as maxInactiveInterval and lastAccessedTime
*/
-public interface SessionAttributes extends DataSerializable {
+public interface SessionAttributes extends DataSerializable, Sizeable {
/**
* Set the session to which these attributes belong.
diff --git a/extensions/geode-modules-session/build.gradle b/extensions/geode-modules-session/build.gradle
index 36ec77f3ece7..bdda9075a7ec 100644
--- a/extensions/geode-modules-session/build.gradle
+++ b/extensions/geode-modules-session/build.gradle
@@ -40,7 +40,7 @@ dependencies {
integrationTestImplementation(project(':geode-logging'))
implementation('javax.servlet:javax.servlet-api')
- implementation('org.apache.tomcat:servlet-api:' + DependencyConstraints.get('tomcat6.version'))
+ implementation('org.apache.tomcat:tomcat-servlet-api:' + DependencyConstraints.get('tomcat8.version'))
implementation('org.slf4j:slf4j-api')
integrationTestImplementation('com.mockrunner:mockrunner-servlet') {
@@ -50,7 +50,7 @@ dependencies {
integrationTestImplementation('commons-io:commons-io')
integrationTestImplementation('javax.servlet:javax.servlet-api')
integrationTestImplementation('junit:junit')
- integrationTestImplementation('org.apache.tomcat:jasper:' + DependencyConstraints.get('tomcat6.version'))
+ integrationTestImplementation('org.apache.tomcat:tomcat-jasper:' + DependencyConstraints.get('tomcat8.version'))
integrationTestImplementation('org.assertj:assertj-core')
integrationTestImplementation('org.eclipse.jetty:jetty-http:' + DependencyConstraints.get('jetty.version') + ':tests')
integrationTestImplementation('org.eclipse.jetty:jetty-server')
diff --git a/extensions/geode-modules-session/src/integrationTest/java/org/apache/geode/modules/session/internal/filter/GemfireHttpSessionTest.java b/extensions/geode-modules-session/src/integrationTest/java/org/apache/geode/modules/session/internal/filter/GemfireHttpSessionTest.java
new file mode 100644
index 000000000000..357a7504bded
--- /dev/null
+++ b/extensions/geode-modules-session/src/integrationTest/java/org/apache/geode/modules/session/internal/filter/GemfireHttpSessionTest.java
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2022 VMware, Inc.
+ * https://network.tanzu.vmware.com/legal_documents/vmware_eula
+ */
+package org.apache.geode.modules.session.internal.filter;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.mockito.Mockito.mock;
+
+import javax.servlet.ServletContext;
+
+import org.junit.Test;
+
+import org.apache.geode.cache.EvictionAction;
+import org.apache.geode.cache.EvictionAlgorithm;
+import org.apache.geode.internal.cache.eviction.EvictionCounters;
+import org.apache.geode.internal.cache.eviction.HeapLRUController;
+import org.apache.geode.modules.session.internal.filter.attributes.DeltaQueuedSessionAttributes;
+import org.apache.geode.modules.session.internal.filter.attributes.DeltaSessionAttributes;
+
+public class GemfireHttpSessionTest {
+
+ @Test
+ public void getSizeInBytesAccountsForId() {
+ GemfireHttpSession session1 = new GemfireHttpSession("id", mock(ServletContext.class));
+ GemfireHttpSession session2 =
+ new GemfireHttpSession("BIGGGGGGGGGGGGGG id", mock(ServletContext.class));
+ int sizeWithSmallId = session1.getSizeInBytes();
+ int sizeWithBigId = session2.getSizeInBytes();
+ assertThat(sizeWithBigId).isGreaterThan(sizeWithSmallId);
+ }
+
+ @Test
+ public void getSizeInBytesAccountsForDeltaSessionAttributes() {
+ GemfireHttpSession session1 = new GemfireHttpSession("id", mock(ServletContext.class));
+ GemfireHttpSession session2 = new GemfireHttpSession("id", mock(ServletContext.class));
+ session2.setManager(mock(SessionManager.class));
+ DeltaSessionAttributes attributes = new DeltaSessionAttributes();
+ attributes.setSession(session2);
+ session2.setAttributes(attributes);
+ session2.putValue("attributeName", "attributeValue");
+ int sizeWithNoAttributes = session1.getSizeInBytes();
+ int sizeWithAttributes = session2.getSizeInBytes();
+ assertThat(sizeWithAttributes).isGreaterThan(sizeWithNoAttributes);
+ }
+
+ @Test
+ public void getSizeInBytesAccountsForDeltaQueuedSessionAttributes() {
+ GemfireHttpSession session1 = new GemfireHttpSession("id", mock(ServletContext.class));
+ GemfireHttpSession session2 = new GemfireHttpSession("id", mock(ServletContext.class));
+ session2.setManager(mock(SessionManager.class));
+ DeltaQueuedSessionAttributes attributes = new DeltaQueuedSessionAttributes();
+ attributes.setSession(session2);
+ session2.setAttributes(attributes);
+ session2.putValue("attributeName", "attributeValue");
+ int sizeWithNoAttributes = session1.getSizeInBytes();
+ int sizeWithAttributes = session2.getSizeInBytes();
+ assertThat(sizeWithAttributes).isGreaterThan(sizeWithNoAttributes);
+ }
+
+ @Test
+ public void verifyHeapLRUControllerWillDetectSizeChanges() {
+ GemfireHttpSession session = new GemfireHttpSession("id", mock(ServletContext.class));
+ session.setManager(mock(SessionManager.class));
+ DeltaSessionAttributes attributes = new DeltaSessionAttributes();
+ attributes.setSession(session);
+ session.setAttributes(attributes);
+ HeapLRUController controller = new HeapLRUController(mock(EvictionCounters.class),
+ EvictionAction.DEFAULT_EVICTION_ACTION, null,
+ EvictionAlgorithm.LRU_HEAP);
+ int sizeWithNoAttributes = controller.entrySize("key", session);
+ session.putValue("attributeName", "attributeValue");
+ int sizeWithAttributes = controller.entrySize("key", session);
+ assertThat(sizeWithAttributes).isGreaterThan(sizeWithNoAttributes);
+ }
+}
diff --git a/extensions/geode-modules-test/build.gradle b/extensions/geode-modules-test/build.gradle
index 58154fc30466..80a6b997ab36 100644
--- a/extensions/geode-modules-test/build.gradle
+++ b/extensions/geode-modules-test/build.gradle
@@ -32,5 +32,5 @@ dependencies {
api(project(':extensions:geode-modules'))
compileOnly(platform(project(':boms:geode-all-bom')))
- compileOnly('org.apache.tomcat:catalina-ha:' + DependencyConstraints.get('tomcat6.version'))
+ compileOnly('org.apache.tomcat:tomcat-catalina-ha:' + DependencyConstraints.get('tomcat8.version'))
}
diff --git a/extensions/geode-modules-test/src/main/java/org/apache/geode/modules/session/AbstractSessionsTest.java b/extensions/geode-modules-test/src/main/java/org/apache/geode/modules/session/AbstractSessionsTest.java
deleted file mode 100644
index da06fef3faf5..000000000000
--- a/extensions/geode-modules-test/src/main/java/org/apache/geode/modules/session/AbstractSessionsTest.java
+++ /dev/null
@@ -1,442 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.modules.session;
-
-import static org.apache.geode.distributed.ConfigurationProperties.LOG_LEVEL;
-import static org.apache.geode.distributed.ConfigurationProperties.MCAST_PORT;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
-import java.beans.PropertyChangeEvent;
-import java.io.File;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.nio.file.Paths;
-
-import javax.servlet.http.HttpSession;
-
-import com.meterware.httpunit.GetMethodWebRequest;
-import com.meterware.httpunit.WebConversation;
-import com.meterware.httpunit.WebRequest;
-import com.meterware.httpunit.WebResponse;
-import org.apache.catalina.core.StandardWrapper;
-import org.apache.commons.io.FileUtils;
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.Test;
-import org.springframework.util.SocketUtils;
-import org.xml.sax.SAXException;
-
-import org.apache.geode.cache.Region;
-import org.apache.geode.modules.session.catalina.DeltaSessionManager;
-import org.apache.geode.modules.session.catalina.PeerToPeerCacheLifecycleListener;
-
-public abstract class AbstractSessionsTest {
- protected static int port;
- private static EmbeddedTomcat server;
- private static StandardWrapper servlet;
- private static Region region;
- protected static DeltaSessionManager sessionManager;
-
- // Set up the servers we need
- protected static void setupServer(final DeltaSessionManager manager) throws Exception {
- FileUtils.copyDirectory(
- Paths.get("..", "..", "resources", "integrationTest", "tomcat").toFile(),
- new File("./tomcat"));
- port = SocketUtils.findAvailableTcpPort();
- server = new EmbeddedTomcat(port, "JVM-1");
-
- final PeerToPeerCacheLifecycleListener p2pListener = new PeerToPeerCacheLifecycleListener();
- p2pListener.setProperty(MCAST_PORT, "0");
- p2pListener.setProperty(LOG_LEVEL, "config");
- server.getEmbedded().addLifecycleListener(p2pListener);
- sessionManager = manager;
- sessionManager.setEnableCommitValve(true);
- server.getRootContext().setManager(sessionManager);
-
- servlet = server.addServlet("/test/*", "default", CommandServlet.class.getName());
- server.startContainer();
-
- /*
- * Can only retrieve the region once the container has started up (and the cache has started
- * too).
- */
- region = sessionManager.getSessionCache().getSessionRegion();
- }
-
- @AfterClass
- public static void teardownClass() {
- server.stopContainer();
- }
-
- /**
- * Reset some data
- */
- @Before
- public void setup() {
- sessionManager.setMaxInactiveInterval(30);
- region.clear();
- }
-
- private WebResponse setCallbackAndExecuteGet(final Callback callback)
- throws IOException, SAXException {
- servlet.getServletContext().setAttribute("callback", callback);
-
- final WebConversation wc = new WebConversation();
- final WebRequest req = new GetMethodWebRequest(String.format("http://localhost:%d/test", port));
- req.setParameter("cmd", QueryCommand.CALLBACK.name());
- req.setParameter("param", "callback");
-
- return wc.getResponse(req);
- }
-
- private WebRequest prepareRequest(final String key, final String value) {
- final WebRequest req = new GetMethodWebRequest(String.format("http://localhost:%d/test", port));
- req.setParameter("cmd", QueryCommand.SET.name());
- req.setParameter("param", key);
- req.setParameter("value", value);
-
- return req;
- }
-
- /*
- * Check that the basics are working
- */
- @Test
- public void testSanity() throws Exception {
- final WebConversation wc = new WebConversation();
- final WebRequest req = new GetMethodWebRequest(String.format("http://localhost:%d/test", port));
- req.setParameter("cmd", QueryCommand.GET.name());
- req.setParameter("param", "null");
- final WebResponse response = wc.getResponse(req);
-
- assertEquals("JSESSIONID", response.getNewCookieNames()[0]);
- }
-
- /*
- * Test callback functionality. This is here really just as an example. Callbacks are useful to
- * implement per test actions which can be defined within the actual test method instead of in a
- * separate servlet class.
- */
- @Test
- public void testCallback() throws Exception {
- final String helloWorld = "Hello World";
- final Callback c = (request, response) -> {
- final PrintWriter out = response.getWriter();
- out.write(helloWorld);
- };
-
- final WebResponse response = setCallbackAndExecuteGet(c);
- assertEquals(helloWorld, response.getText());
- }
-
- /*
- * Test that calling session.isNew() works for the initial as well as subsequent requests.
- */
- @Test
- public void testIsNew() throws Exception {
- final Callback c = (request, response) -> {
- final HttpSession session = request.getSession();
- response.getWriter().write(Boolean.toString(session.isNew()));
- };
- servlet.getServletContext().setAttribute("callback", c);
-
- final WebConversation wc = new WebConversation();
- final WebRequest req = new GetMethodWebRequest(String.format("http://localhost:%d/test", port));
-
- req.setParameter("cmd", QueryCommand.CALLBACK.name());
- req.setParameter("param", "callback");
- WebResponse response = wc.getResponse(req);
-
- assertEquals("true", response.getText());
- response = wc.getResponse(req);
-
- assertEquals("false", response.getText());
- }
-
- /*
- * Check that our session persists. The values we pass in as query params are used to set
- * attributes on the session.
- */
- @Test
- public void testSessionPersists1() throws Exception {
- final String key = "value_testSessionPersists1";
- final String value = "Foo";
-
- final WebConversation wc = new WebConversation();
- final WebRequest req = prepareRequest(key, value);
- WebResponse response = wc.getResponse(req);
- final String sessionId = response.getNewCookieValue("JSESSIONID");
-
- assertNotNull("No apparent session cookie", sessionId);
-
- // The request retains the cookie from the prior response...
- req.setParameter("cmd", QueryCommand.GET.name());
- req.setParameter("param", key);
- req.removeParameter("value");
- response = wc.getResponse(req);
-
- assertEquals(value, response.getText());
- }
-
- /*
- * Test that invalidating a session makes it's attributes inaccessible.
- */
- @Test
- public void testInvalidate() throws Exception {
- final String key = "value_testInvalidate";
- final String value = "Foo";
-
- final WebConversation wc = new WebConversation();
- final WebRequest req = prepareRequest(key, value);
- wc.getResponse(req);
-
- // Invalidate the session
- req.removeParameter("param");
- req.removeParameter("value");
- req.setParameter("cmd", QueryCommand.INVALIDATE.name());
- wc.getResponse(req);
-
- // The attribute should not be accessible now...
- req.setParameter("cmd", QueryCommand.GET.name());
- req.setParameter("param", key);
- final WebResponse response = wc.getResponse(req);
-
- assertEquals("", response.getText());
- }
-
- /*
- * Test setting the session expiration
- */
- @Test
- public void testSessionExpiration1() throws Exception {
- // TestSessions only live for a second
- sessionManager.setMaxInactiveInterval(1);
-
- final String key = "value_testSessionExpiration1";
- final String value = "Foo";
-
- final WebConversation wc = new WebConversation();
- final WebRequest req = prepareRequest(key, value);
- wc.getResponse(req);
-
- // Sleep a while
- Thread.sleep(2000);
-
- // The attribute should not be accessible now...
- req.setParameter("cmd", QueryCommand.GET.name());
- req.setParameter("param", key);
- final WebResponse response = wc.getResponse(req);
-
- assertEquals("", response.getText());
- }
-
- /**
- * Test setting the session expiration via a property change as would happen under normal
- * deployment conditions.
- */
- @Test
- public void testSessionExpiration2() {
- // TestSessions only live for a minute
- sessionManager.propertyChange(new PropertyChangeEvent(server.getRootContext(), "sessionTimeout",
- 30, 1));
-
- // Check that the value has been set to 60 seconds
- assertEquals(60, sessionManager.getMaxInactiveInterval());
- }
-
- /*
- * Test expiration of a session by the tomcat container, rather than gemfire expiration
- */
- @Test
- public void testSessionExpirationByContainer() throws Exception {
-
- final String key = "value_testSessionExpiration1";
- final String value = "Foo";
-
- final WebConversation wc = new WebConversation();
- final WebRequest req = prepareRequest(key, value);
- wc.getResponse(req);
-
- // Set the session timeout of this one session.
- req.setParameter("cmd", QueryCommand.SET_MAX_INACTIVE.name());
- req.setParameter("value", "1");
- wc.getResponse(req);
-
- // Wait until the session should expire
- Thread.sleep(2000);
-
- // Do a request, which should cause the session to be expired
- req.setParameter("cmd", QueryCommand.GET.name());
- req.setParameter("param", key);
- final WebResponse response = wc.getResponse(req);
-
- assertEquals("", response.getText());
- }
-
- /*
- * Test that removing a session attribute also removes it from the region
- */
- @Test
- public void testRemoveAttribute() throws Exception {
- final String key = "value_testRemoveAttribute";
- final String value = "Foo";
-
- final WebConversation wc = new WebConversation();
- final WebRequest req = prepareRequest(key, value);
- WebResponse response = wc.getResponse(req);
- final String sessionId = response.getNewCookieValue("JSESSIONID");
-
- // Implicitly remove the attribute
- req.removeParameter("value");
- wc.getResponse(req);
-
- // The attribute should not be accessible now...
- req.setParameter("cmd", QueryCommand.GET.name());
- req.setParameter("param", key);
- response = wc.getResponse(req);
-
- assertEquals("", response.getText());
- assertNull(region.get(sessionId).getAttribute(key));
- }
-
- /*
- * Test that a session attribute gets set into the region too.
- */
- @Test
- public void testBasicRegion() throws Exception {
- final String key = "value_testBasicRegion";
- final String value = "Foo";
-
- final WebConversation wc = new WebConversation();
- final WebRequest req = prepareRequest(key, value);
- final WebResponse response = wc.getResponse(req);
- final String sessionId = response.getNewCookieValue("JSESSIONID");
-
- assertEquals(value, region.get(sessionId).getAttribute(key));
- }
-
- /*
- * Test that a session attribute gets removed from the region when the session is invalidated.
- */
- @Test
- public void testRegionInvalidate() throws Exception {
- final String key = "value_testRegionInvalidate";
- final String value = "Foo";
-
- final WebConversation wc = new WebConversation();
- final WebRequest req = prepareRequest(key, value);
- final WebResponse response = wc.getResponse(req);
- final String sessionId = response.getNewCookieValue("JSESSIONID");
-
- // Invalidate the session
- req.removeParameter("param");
- req.removeParameter("value");
- req.setParameter("cmd", QueryCommand.INVALIDATE.name());
- wc.getResponse(req);
-
- assertNull("The region should not have an entry for this session", region.get(sessionId));
- }
-
- /*
- * Test that multiple attribute updates, within the same request result in only the latest one
- * being effective.
- */
- @Test
- public void testMultipleAttributeUpdates() throws Exception {
- final String key = "value_testMultipleAttributeUpdates";
- final Callback c = (request, response) -> {
- final HttpSession session = request.getSession();
- for (int i = 0; i < 1000; i++) {
- session.setAttribute(key, Integer.toString(i));
- }
- };
-
- final WebResponse response = setCallbackAndExecuteGet(c);
- final String sessionId = response.getNewCookieValue("JSESSIONID");
- assertEquals("999", region.get(sessionId).getAttribute(key));
- }
-
- /*
- * Test for issue #38 CommitSessionValve throws exception on invalidated sessions
- */
- @Test
- public void testCommitSessionValveInvalidSession() throws Exception {
- final Callback c = (request, response) -> {
- final HttpSession session = request.getSession();
- session.invalidate();
- response.getWriter().write("done");
- };
-
- final WebResponse response = setCallbackAndExecuteGet(c);
- assertEquals("done", response.getText());
- }
-
- /*
- * Test for issue #45 Sessions are being created for every request
- */
- @Test
- public void testExtraSessionsNotCreated() throws Exception {
- final Callback c = (request, response) -> {
- // Do nothing with sessions
- response.getWriter().write("done");
- };
-
- final WebResponse response = setCallbackAndExecuteGet(c);
- assertEquals("done", response.getText());
- assertEquals("The region should be empty", 0, region.size());
- }
-
- /*
- * Test for issue #46 lastAccessedTime is not updated at the start of the request, but only at the
- * end.
- */
- @Test
- public void testLastAccessedTime() throws Exception {
- final Callback c = (request, response) -> {
- final HttpSession session = request.getSession();
- // Hack to expose the session to our test context
- session.getServletContext().setAttribute("session", session);
- session.setAttribute("lastAccessTime", session.getLastAccessedTime());
- try {
- Thread.sleep(100);
- } catch (final InterruptedException ex) {
- // Ignore.
- }
- session.setAttribute("somethingElse", 1);
- request.getSession();
- response.getWriter().write("done");
- };
- servlet.getServletContext().setAttribute("callback", c);
-
- final WebConversation wc = new WebConversation();
- final WebRequest req = new GetMethodWebRequest(String.format("http://localhost:%d/test", port));
-
- // Execute the callback
- req.setParameter("cmd", QueryCommand.CALLBACK.name());
- req.setParameter("param", "callback");
- wc.getResponse(req);
-
- final HttpSession session = (HttpSession) servlet.getServletContext().getAttribute("session");
- final Long lastAccess = (Long) session.getAttribute("lastAccessTime");
-
- assertTrue(
- "Last access time not set correctly: " + lastAccess + " not <= "
- + session.getLastAccessedTime(),
- lastAccess <= session.getLastAccessedTime());
- }
-}
diff --git a/extensions/geode-modules-test/src/main/java/org/apache/geode/modules/session/EmbeddedTomcat.java b/extensions/geode-modules-test/src/main/java/org/apache/geode/modules/session/EmbeddedTomcat.java
deleted file mode 100644
index ec1e0a8360f4..000000000000
--- a/extensions/geode-modules-test/src/main/java/org/apache/geode/modules/session/EmbeddedTomcat.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.modules.session;
-
-import java.io.File;
-import java.net.InetAddress;
-import java.net.MalformedURLException;
-
-import org.apache.catalina.Context;
-import org.apache.catalina.Engine;
-import org.apache.catalina.Host;
-import org.apache.catalina.LifecycleException;
-import org.apache.catalina.connector.Connector;
-import org.apache.catalina.core.StandardEngine;
-import org.apache.catalina.core.StandardService;
-import org.apache.catalina.core.StandardWrapper;
-import org.apache.catalina.loader.WebappLoader;
-import org.apache.catalina.realm.MemoryRealm;
-import org.apache.catalina.startup.Embedded;
-import org.apache.catalina.valves.ValveBase;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
-
-import org.apache.geode.modules.session.catalina.JvmRouteBinderValve;
-
-public class EmbeddedTomcat {
- private final Log logger = LogFactory.getLog(getClass());
- private final int port;
- private final Embedded container;
- private final Context rootContext;
-
- EmbeddedTomcat(int port, String jvmRoute) throws MalformedURLException {
- this.port = port;
-
- // create server
- container = new Embedded();
-
- // The directory to create the Tomcat server configuration under.
- container.setCatalinaHome("tomcat");
- container.setRealm(new MemoryRealm());
-
- // create webapp loader
- WebappLoader loader = new WebappLoader(getClass().getClassLoader());
- // The classes directory for the web application being run.
- loader.addRepository(new File("target/classes").toURI().toURL().toString());
-
- // The web resources directory for the web application being run.
- String webappDir = "";
- rootContext = container.createContext("", webappDir);
- rootContext.setLoader(loader);
- rootContext.setReloadable(true);
-
- // Otherwise we get NPE when instantiating servlets
- rootContext.setIgnoreAnnotations(true);
-
- // create host
- Host localHost = container.createHost("127.0.0.1", new File("").getAbsolutePath());
- localHost.addChild(rootContext);
-
- localHost.setDeployOnStartup(true);
-
- // create engine
- Engine engine = container.createEngine();
- engine.setName("localEngine");
- engine.addChild(localHost);
- engine.setDefaultHost(localHost.getName());
- engine.setJvmRoute(jvmRoute);
- engine.setService(new StandardService());
- container.addEngine(engine);
-
- // create http connector
- Connector httpConnector = container.createConnector((InetAddress) null, port, false);
- container.addConnector(httpConnector);
- container.setAwait(true);
-
- // Create the JVMRoute valve for session failover
- ValveBase valve = new JvmRouteBinderValve();
- ((StandardEngine) engine).addValve(valve);
- }
-
- /**
- * Starts the embedded Tomcat server.
- */
- void startContainer() throws LifecycleException {
- // start server
- container.start();
-
- // add shutdown hook to stop server
- Runtime.getRuntime().addShutdownHook(new Thread(this::stopContainer));
- }
-
- /**
- * Stops the embedded Tomcat server.
- */
- void stopContainer() {
- try {
- if (container != null) {
- container.stop();
- logger.info("Stopped container");
- }
- } catch (LifecycleException exception) {
- logger.warn("Cannot Stop Tomcat" + exception.getMessage());
- }
- }
-
- StandardWrapper addServlet(String path, String name, String clazz) {
- StandardWrapper servlet = (StandardWrapper) rootContext.createWrapper();
- servlet.setName(name);
- servlet.setServletClass(clazz);
- servlet.setLoadOnStartup(1);
-
- rootContext.addChild(servlet);
- rootContext.addServletMapping(path, name);
-
- servlet.setParent(rootContext);
-
- return servlet;
- }
-
- Embedded getEmbedded() {
- return container;
- }
-
- Context getRootContext() {
- return rootContext;
- }
-
- public int getPort() {
- return port;
- }
-}
diff --git a/extensions/geode-modules-test/src/main/java/org/apache/geode/modules/session/catalina/AbstractCommitSessionValveIntegrationTest.java b/extensions/geode-modules-test/src/main/java/org/apache/geode/modules/session/catalina/AbstractCommitSessionValveIntegrationTest.java
index 66fcd0800828..5c1e46a3b79d 100644
--- a/extensions/geode-modules-test/src/main/java/org/apache/geode/modules/session/catalina/AbstractCommitSessionValveIntegrationTest.java
+++ b/extensions/geode-modules-test/src/main/java/org/apache/geode/modules/session/catalina/AbstractCommitSessionValveIntegrationTest.java
@@ -64,8 +64,8 @@ protected void parameterizedSetUp(final RegionShortcut regionShortcut) {
deltaSessionFacade = new DeltaSessionFacade(deltaSession);
// Valve use the context to log messages
- when(deltaSessionManager.getTheContext()).thenReturn(mock(Context.class));
- when(deltaSessionManager.getTheContext().getLogger()).thenReturn(mock(Log.class));
+ when(deltaSessionManager.getContext()).thenReturn(mock(Context.class));
+ when(deltaSessionManager.getContext().getLogger()).thenReturn(mock(Log.class));
}
@Test
diff --git a/extensions/geode-modules-test/src/main/java/org/apache/geode/modules/session/catalina/AbstractDeltaSessionManagerTest.java b/extensions/geode-modules-test/src/main/java/org/apache/geode/modules/session/catalina/AbstractDeltaSessionManagerTest.java
index c28256cbb680..3bffc49172af 100644
--- a/extensions/geode-modules-test/src/main/java/org/apache/geode/modules/session/catalina/AbstractDeltaSessionManagerTest.java
+++ b/extensions/geode-modules-test/src/main/java/org/apache/geode/modules/session/catalina/AbstractDeltaSessionManagerTest.java
@@ -15,9 +15,8 @@
package org.apache.geode.modules.session.catalina;
-import static org.apache.geode.modules.util.RegionConfiguration.DEFAULT_MAX_INACTIVE_INTERVAL;
+import static java.util.concurrent.TimeUnit.MINUTES;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
@@ -25,7 +24,6 @@
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import java.beans.PropertyChangeEvent;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
@@ -35,7 +33,7 @@
import org.apache.catalina.Context;
import org.apache.catalina.Session;
import org.apache.juli.logging.Log;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.apache.geode.cache.Cache;
import org.apache.geode.cache.Region;
@@ -53,7 +51,7 @@ public abstract class AbstractDeltaSessionManagerTest operatingRegion;
- public void initTest() {
+ void initTest() {
sessionCache = mock(AbstractSessionCache.class);
cache = mock(GemFireCacheImpl.class);
logger = mock(Log.class);
@@ -64,14 +62,14 @@ public void initTest() {
doReturn(sessionCache).when(manager).getSessionCache();
doReturn(logger).when(manager).getLogger();
- doReturn(context).when(manager).getTheContext();
+ doReturn(context).when(manager).getContext();
doReturn(managerStats).when(manager).getStatistics();
doReturn(cacheStats).when(sessionCache).getStatistics();
doReturn(operatingRegion).when(sessionCache).getOperatingRegion();
}
@Test
- public void getRegionAttributesIdSetsIdFromSessionCacheWhenAttributesIdIsNull() {
+ void getRegionAttributesIdSetsIdFromSessionCacheWhenAttributesIdIsNull() {
final String regionAttributesId = "attributesIdFromSessionCache";
doReturn(regionAttributesId).when(sessionCache).getDefaultRegionAttributesId();
@@ -82,7 +80,7 @@ public void getRegionAttributesIdSetsIdFromSessionCacheWhenAttributesIdIsNull()
}
@Test
- public void getEnableLocalCacheSetsIdFromSessionCacheWhenEnableLocalCacheIsNull() {
+ void getEnableLocalCacheSetsIdFromSessionCacheWhenEnableLocalCacheIsNull() {
final boolean isLocalCacheEnabled = true;
doReturn(isLocalCacheEnabled).when(sessionCache).getDefaultEnableLocalCache();
@@ -93,14 +91,14 @@ public void getEnableLocalCacheSetsIdFromSessionCacheWhenEnableLocalCacheIsNull(
}
@Test
- public void findSessionsReturnsNullWhenIdIsNull() throws IOException {
+ void findSessionsReturnsNullWhenIdIsNull() throws IOException {
final Session session = manager.findSession(null);
assertThat(session).isNull();
}
@Test
- public void findSessionsReturnsNullAndLogsMessageWhenContextNameIsNotValid() throws IOException {
+ void findSessionsReturnsNullAndLogsMessageWhenContextNameIsNotValid() throws IOException {
final String sessionId = "sessionId";
final String contextName = "contextName";
final String invalidContextName = "invalidContextName";
@@ -117,7 +115,7 @@ public void findSessionsReturnsNullAndLogsMessageWhenContextNameIsNotValid() thr
}
@Test
- public void findSessionsReturnsNullWhenIdIsNotFound() throws IOException {
+ void findSessionsReturnsNullWhenIdIsNotFound() throws IOException {
final String sessionId = "sessionId";
when(sessionCache.getSession(sessionId)).thenReturn(null);
@@ -128,7 +126,7 @@ public void findSessionsReturnsNullWhenIdIsNotFound() throws IOException {
}
@Test
- public void findSessionsReturnsProperSessionByIdWhenIdAndContextNameIsValid() throws IOException {
+ void findSessionsReturnsProperSessionByIdWhenIdAndContextNameIsValid() throws IOException {
final String sessionId = "sessionId";
final String contextName = "contextName";
@@ -143,7 +141,7 @@ public void findSessionsReturnsProperSessionByIdWhenIdAndContextNameIsValid() th
}
@Test
- public void removeProperlyDestroysSessionFromSessionCacheWhenSessionIsNotExpired() {
+ void removeProperlyDestroysSessionFromSessionCacheWhenSessionIsNotExpired() {
final DeltaSession sessionToDestroy = mock(DeltaSession.class);
final String sessionId = "sessionId";
@@ -156,7 +154,7 @@ public void removeProperlyDestroysSessionFromSessionCacheWhenSessionIsNotExpired
}
@Test
- public void removeDoesNotDestroySessionFromSessionCacheWhenSessionIsExpired() {
+ void removeDoesNotDestroySessionFromSessionCacheWhenSessionIsExpired() {
final DeltaSession sessionToDestroy = mock(DeltaSession.class);
final String sessionId = "sessionId";
@@ -169,7 +167,7 @@ public void removeDoesNotDestroySessionFromSessionCacheWhenSessionIsExpired() {
}
@Test
- public void addPutsSessionIntoSessionCacheAndIncrementsStats() {
+ void addPutsSessionIntoSessionCacheAndIncrementsStats() {
final DeltaSession sessionToPut = mock(DeltaSession.class);
manager.add(sessionToPut);
@@ -179,7 +177,7 @@ public void addPutsSessionIntoSessionCacheAndIncrementsStats() {
}
@Test
- public void listIdsListsAllPresentIds() {
+ void listIdsListsAllPresentIds() {
final Set ids = new HashSet<>();
ids.add("id1");
ids.add("id2");
@@ -195,7 +193,7 @@ public void listIdsListsAllPresentIds() {
}
@Test
- public void successfulUnloadWithClientServerSessionCachePerformsLocalDestroy()
+ void successfulUnloadWithClientServerSessionCachePerformsLocalDestroy()
throws IOException {
when(sessionCache.getCache()).thenReturn(cache);
when(context.getPath()).thenReturn("contextPath");
@@ -207,51 +205,17 @@ public void successfulUnloadWithClientServerSessionCachePerformsLocalDestroy()
}
@Test
- public void propertyChangeSetsMaxInactiveIntervalWithCorrectPropertyNameAndValue() {
- final String propertyName = "sessionTimeout";
- final PropertyChangeEvent event = mock(PropertyChangeEvent.class);
- final Context eventContext = mock(Context.class);
- final Integer newValue = 1;
+ void getMaxInactiveIntervalReturnsNegativeOneWhenSessionTimeoutIsNegativeOne() {
+ when(context.getSessionTimeout()).thenReturn(-1);
- when(event.getSource()).thenReturn(eventContext);
- when(event.getPropertyName()).thenReturn(propertyName);
- when(event.getNewValue()).thenReturn(newValue);
-
- manager.propertyChange(event);
-
- verify(manager).setMaxInactiveInterval(newValue * 60);
- }
-
- @Test
- public void propertyChangeDoesNotSetMaxInactiveIntervalWithIncorrectPropertyName() {
- final String propertyName = "wrong name";
- final PropertyChangeEvent event = mock(PropertyChangeEvent.class);
- final Context eventContext = mock(Context.class);
-
- when(event.getSource()).thenReturn(eventContext);
- when(event.getPropertyName()).thenReturn(propertyName);
-
- manager.propertyChange(event);
-
- verify(manager, times(0)).setMaxInactiveInterval(anyInt());
+ assertThat(manager.getMaxInactiveInterval()).isEqualTo(-1);
}
@Test
- public void propertyChangeDoesNotSetNewMaxInactiveIntervalWithCorrectPropertyNameAndInvalidPropertyValue() {
- final String propertyName = "sessionTimeout";
- final PropertyChangeEvent event = mock(PropertyChangeEvent.class);
- final Context eventContext = mock(Context.class);
- final Integer newValue = -2;
- final Integer oldValue = DEFAULT_MAX_INACTIVE_INTERVAL;
-
- when(event.getSource()).thenReturn(eventContext);
- when(event.getPropertyName()).thenReturn(propertyName);
- when(event.getNewValue()).thenReturn(newValue);
- when(event.getOldValue()).thenReturn(oldValue);
-
- manager.propertyChange(event);
+ void getMaxInactiveIntervalReturnsSeconds() {
+ when(context.getSessionTimeout()).thenReturn(20);
- verify(manager).setMaxInactiveInterval(oldValue);
+ assertThat(manager.getMaxInactiveInterval()).isEqualTo(MINUTES.toSeconds(20));
}
}
diff --git a/extensions/geode-modules-tomcat7/build.gradle b/extensions/geode-modules-tomcat7/build.gradle
deleted file mode 100644
index e1e75b52a10f..000000000000
--- a/extensions/geode-modules-tomcat7/build.gradle
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import org.apache.geode.gradle.plugins.DependencyConstraints
-
-plugins {
- id 'standard-subproject-configuration'
- id 'warnings'
-}
-
-evaluationDependsOn(":geode-core")
-
-dependencies {
- //main
- implementation(platform(project(':boms:geode-all-bom')))
-
- api(project(':geode-core'))
- api(project(':extensions:geode-modules'))
-
- compileOnly(platform(project(':boms:geode-all-bom')))
- compileOnly('org.apache.tomcat:tomcat-catalina:' + DependencyConstraints.get('tomcat7.version'))
- compileOnly('org.apache.tomcat:tomcat-coyote:' + DependencyConstraints.get('tomcat7.version'))
-
-
- // test
- testImplementation(project(':extensions:geode-modules-test'))
- testImplementation('junit:junit')
- testImplementation('org.assertj:assertj-core')
- testImplementation('org.mockito:mockito-core')
- testImplementation('org.apache.tomcat:tomcat-catalina:' + DependencyConstraints.get('tomcat7.version'))
- testImplementation('org.apache.tomcat:tomcat-coyote:' + DependencyConstraints.get('tomcat7.version'))
-
-
- // integrationTest
- integrationTestImplementation(project(':extensions:geode-modules-test'))
- integrationTestImplementation(project(':geode-dunit'))
- integrationTestImplementation('org.httpunit:httpunit')
- integrationTestImplementation('org.apache.tomcat:tomcat-coyote:' + DependencyConstraints.get('tomcat7.version'))
- integrationTestImplementation('org.apache.tomcat:tomcat-catalina:' + DependencyConstraints.get('tomcat7.version'))
-}
-
-sonarqube {
- skipProject = true
-}
diff --git a/extensions/geode-modules-tomcat7/src/integrationTest/java/org/apache/geode/modules/session/Tomcat7SessionsTest.java b/extensions/geode-modules-tomcat7/src/integrationTest/java/org/apache/geode/modules/session/Tomcat7SessionsTest.java
deleted file mode 100644
index f37eedd8593b..000000000000
--- a/extensions/geode-modules-tomcat7/src/integrationTest/java/org/apache/geode/modules/session/Tomcat7SessionsTest.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.modules.session;
-
-import static org.junit.Assert.assertEquals;
-
-import com.meterware.httpunit.GetMethodWebRequest;
-import com.meterware.httpunit.WebConversation;
-import com.meterware.httpunit.WebRequest;
-import com.meterware.httpunit.WebResponse;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import org.apache.geode.modules.session.catalina.Tomcat7DeltaSessionManager;
-import org.apache.geode.test.junit.categories.HttpSessionTest;
-
-@Category({HttpSessionTest.class})
-public class Tomcat7SessionsTest extends AbstractSessionsTest {
-
- // Set up the session manager we need
- @BeforeClass
- public static void setupClass() throws Exception {
- setupServer(new Tomcat7DeltaSessionManager());
- }
-
- /**
- * Test setting the session expiration
- */
- @Test
- @Override
- public void testSessionExpiration1() throws Exception {
- // TestSessions only live for a minute
- sessionManager.getTheContext().setSessionTimeout(1);
-
- final String key = "value_testSessionExpiration1";
- final String value = "Foo";
-
- final WebConversation wc = new WebConversation();
- final WebRequest req = new GetMethodWebRequest(String.format("http://localhost:%d/test", port));
-
- // Set an attribute
- req.setParameter("cmd", QueryCommand.SET.name());
- req.setParameter("param", key);
- req.setParameter("value", value);
- WebResponse response = wc.getResponse(req);
-
- // Sleep a while
- Thread.sleep(65000);
-
- // The attribute should not be accessible now...
- req.setParameter("cmd", QueryCommand.GET.name());
- req.setParameter("param", key);
- response = wc.getResponse(req);
-
- assertEquals("", response.getText());
- }
-}
diff --git a/extensions/geode-modules-tomcat7/src/integrationTest/java/org/apache/geode/modules/session/catalina/CommitSessionValveIntegrationTest.java b/extensions/geode-modules-tomcat7/src/integrationTest/java/org/apache/geode/modules/session/catalina/CommitSessionValveIntegrationTest.java
deleted file mode 100644
index b64e86219071..000000000000
--- a/extensions/geode-modules-tomcat7/src/integrationTest/java/org/apache/geode/modules/session/catalina/CommitSessionValveIntegrationTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-
-package org.apache.geode.modules.session.catalina;
-
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.mock;
-
-import org.apache.catalina.Context;
-import org.apache.catalina.connector.Connector;
-import org.apache.catalina.connector.Request;
-import org.apache.catalina.connector.Response;
-import org.apache.coyote.OutputBuffer;
-import org.apache.juli.logging.Log;
-import org.junit.Before;
-
-public class CommitSessionValveIntegrationTest
- extends AbstractCommitSessionValveIntegrationTest {
-
- @Before
- public void setUp() {
- final Context context = mock(Context.class);
- doReturn(mock(Log.class)).when(context).getLogger();
-
- request = mock(Request.class);
- doReturn(context).when(request).getContext();
-
- final OutputBuffer outputBuffer = mock(OutputBuffer.class);
-
- final org.apache.coyote.Response coyoteResponse = new org.apache.coyote.Response();
- coyoteResponse.setOutputBuffer(outputBuffer);
-
- response = new Response();
- response.setConnector(mock(Connector.class));
- response.setRequest(request);
- response.setCoyoteResponse(coyoteResponse);
- }
-
-
- @Override
- protected Tomcat7CommitSessionValve createCommitSessionValve() {
- return new Tomcat7CommitSessionValve();
- }
-
-}
diff --git a/extensions/geode-modules-tomcat7/src/integrationTest/java/org/apache/geode/modules/session/catalina/DeltaSession7Test.java b/extensions/geode-modules-tomcat7/src/integrationTest/java/org/apache/geode/modules/session/catalina/DeltaSession7Test.java
deleted file mode 100644
index 7af5a91c3e15..000000000000
--- a/extensions/geode-modules-tomcat7/src/integrationTest/java/org/apache/geode/modules/session/catalina/DeltaSession7Test.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.modules.session.catalina;
-
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-
-
-public class DeltaSession7Test
- extends AbstractDeltaSessionIntegrationTest {
-
- public DeltaSession7Test() {
- super(mock(Tomcat7DeltaSessionManager.class));
- }
-
- @Override
- public void before() {
- super.before();
- when(manager.getContainer()).thenReturn(context);
- }
-
- @Override
- protected DeltaSession7 newSession(Tomcat7DeltaSessionManager manager) {
- return new DeltaSession7(manager);
- }
-
-}
diff --git a/extensions/geode-modules-tomcat7/src/integrationTest/resources/tomcat/conf/tomcat-users.xml b/extensions/geode-modules-tomcat7/src/integrationTest/resources/tomcat/conf/tomcat-users.xml
deleted file mode 100644
index 6c9f21730f15..000000000000
--- a/extensions/geode-modules-tomcat7/src/integrationTest/resources/tomcat/conf/tomcat-users.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/extensions/geode-modules-tomcat7/src/integrationTest/resources/tomcat/logs/.gitkeep b/extensions/geode-modules-tomcat7/src/integrationTest/resources/tomcat/logs/.gitkeep
deleted file mode 100644
index e69de29bb2d1..000000000000
diff --git a/extensions/geode-modules-tomcat7/src/integrationTest/resources/tomcat/temp/.gitkeep b/extensions/geode-modules-tomcat7/src/integrationTest/resources/tomcat/temp/.gitkeep
deleted file mode 100644
index e69de29bb2d1..000000000000
diff --git a/extensions/geode-modules-tomcat7/src/main/java/org/apache/geode/modules/session/catalina/DeltaSession7.java b/extensions/geode-modules-tomcat7/src/main/java/org/apache/geode/modules/session/catalina/DeltaSession7.java
deleted file mode 100644
index 1371e121e5c8..000000000000
--- a/extensions/geode-modules-tomcat7/src/main/java/org/apache/geode/modules/session/catalina/DeltaSession7.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.modules.session.catalina;
-
-import org.apache.catalina.Manager;
-
-@SuppressWarnings("serial")
-public class DeltaSession7 extends DeltaSession {
-
- /**
- * Construct a new Session associated with no Manager. The
- * Manager will be assigned later using {@link #setOwner(Object)}.
- */
- @SuppressWarnings("unused")
- public DeltaSession7() {
- super();
- }
-
- /**
- * Construct a new Session associated with the specified Manager.
- *
- * @param manager The manager with which this Session is associated
- */
- DeltaSession7(Manager manager) {
- super(manager);
- }
-}
diff --git a/extensions/geode-modules-tomcat7/src/main/java/org/apache/geode/modules/session/catalina/Tomcat7CommitSessionOutputBuffer.java b/extensions/geode-modules-tomcat7/src/main/java/org/apache/geode/modules/session/catalina/Tomcat7CommitSessionOutputBuffer.java
deleted file mode 100644
index fcf01b2e3e5a..000000000000
--- a/extensions/geode-modules-tomcat7/src/main/java/org/apache/geode/modules/session/catalina/Tomcat7CommitSessionOutputBuffer.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-
-package org.apache.geode.modules.session.catalina;
-
-import java.io.IOException;
-
-import org.apache.coyote.OutputBuffer;
-import org.apache.coyote.Response;
-import org.apache.tomcat.util.buf.ByteChunk;
-
-/**
- * Delegating {@link OutputBuffer} that commits sessions on write through. Output data is buffered
- * ahead of this object and flushed through this interface when full or explicitly flushed.
- */
-class Tomcat7CommitSessionOutputBuffer implements OutputBuffer {
-
- private final SessionCommitter sessionCommitter;
- private final OutputBuffer delegate;
-
- public Tomcat7CommitSessionOutputBuffer(final SessionCommitter sessionCommitter,
- final OutputBuffer delegate) {
- this.sessionCommitter = sessionCommitter;
- this.delegate = delegate;
- }
-
- @Override
- public int doWrite(final ByteChunk chunk, final Response response) throws IOException {
- sessionCommitter.commit();
- return delegate.doWrite(chunk, response);
- }
-
- @Override
- public long getBytesWritten() {
- return delegate.getBytesWritten();
- }
-
- OutputBuffer getDelegate() {
- return delegate;
- }
-}
diff --git a/extensions/geode-modules-tomcat7/src/main/java/org/apache/geode/modules/session/catalina/Tomcat7CommitSessionValve.java b/extensions/geode-modules-tomcat7/src/main/java/org/apache/geode/modules/session/catalina/Tomcat7CommitSessionValve.java
deleted file mode 100644
index f6a483973f45..000000000000
--- a/extensions/geode-modules-tomcat7/src/main/java/org/apache/geode/modules/session/catalina/Tomcat7CommitSessionValve.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-
-package org.apache.geode.modules.session.catalina;
-
-import java.lang.reflect.Field;
-
-import org.apache.catalina.connector.Request;
-import org.apache.catalina.connector.Response;
-import org.apache.coyote.OutputBuffer;
-
-public class Tomcat7CommitSessionValve
- extends AbstractCommitSessionValve {
-
- private static final Field outputBufferField;
-
- static {
- try {
- outputBufferField = org.apache.coyote.Response.class.getDeclaredField("outputBuffer");
- outputBufferField.setAccessible(true);
- } catch (final NoSuchFieldException e) {
- throw new IllegalStateException(e);
- }
- }
-
- @Override
- Response wrapResponse(final Response response) {
- final org.apache.coyote.Response coyoteResponse = response.getCoyoteResponse();
- final OutputBuffer delegateOutputBuffer = getOutputBuffer(coyoteResponse);
- if (!(delegateOutputBuffer instanceof Tomcat7CommitSessionOutputBuffer)) {
- final Request request = response.getRequest();
- final OutputBuffer sessionCommitOutputBuffer =
- new Tomcat7CommitSessionOutputBuffer(() -> commitSession(request), delegateOutputBuffer);
- coyoteResponse.setOutputBuffer(sessionCommitOutputBuffer);
- }
- return response;
- }
-
- static OutputBuffer getOutputBuffer(final org.apache.coyote.Response coyoteResponse) {
- try {
- return (OutputBuffer) outputBufferField.get(coyoteResponse);
- } catch (final IllegalAccessException e) {
- throw new IllegalStateException(e);
- }
- }
-}
diff --git a/extensions/geode-modules-tomcat7/src/main/java/org/apache/geode/modules/session/catalina/Tomcat7DeltaSessionManager.java b/extensions/geode-modules-tomcat7/src/main/java/org/apache/geode/modules/session/catalina/Tomcat7DeltaSessionManager.java
deleted file mode 100644
index ec2e00db9bfb..000000000000
--- a/extensions/geode-modules-tomcat7/src/main/java/org/apache/geode/modules/session/catalina/Tomcat7DeltaSessionManager.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.modules.session.catalina;
-
-import java.io.IOException;
-
-import org.apache.catalina.LifecycleException;
-import org.apache.catalina.LifecycleListener;
-import org.apache.catalina.LifecycleState;
-import org.apache.catalina.session.StandardSession;
-
-public class Tomcat7DeltaSessionManager extends DeltaSessionManager {
-
- /**
- * The LifecycleSupport for this component.
- */
- @SuppressWarnings("deprecation")
- protected org.apache.catalina.util.LifecycleSupport lifecycle =
- new org.apache.catalina.util.LifecycleSupport(this);
-
- /**
- * Prepare for the beginning of active use of the public methods of this component. This method
- * should be called after configure(), and before any of the public methods of the
- * component are utilized.
- *
- * @throws LifecycleException if this component detects a fatal error that prevents this component
- * from being used
- */
- @Override
- public void startInternal() throws LifecycleException {
- startInternalBase();
- if (getLogger().isDebugEnabled()) {
- getLogger().debug(this + ": Starting");
- }
- if (started.get()) {
- return;
- }
-
- lifecycle.fireLifecycleEvent(START_EVENT, null);
-
- // Register our various valves
- registerJvmRouteBinderValve();
-
- if (isCommitValveEnabled()) {
- registerCommitSessionValve();
- }
-
- // Initialize the appropriate session cache interface
- initializeSessionCache();
-
- try {
- load();
- } catch (ClassNotFoundException | IOException e) {
- throw new LifecycleException("Exception starting manager", e);
- }
-
- // Create the timer and schedule tasks
- scheduleTimerTasks();
-
- started.set(true);
- setLifecycleState(LifecycleState.STARTING);
- }
-
- void setLifecycleState(LifecycleState newState) throws LifecycleException {
- setState(newState);
- }
-
- void startInternalBase() throws LifecycleException {
- super.startInternal();
- }
-
- /**
- * Gracefully terminate the active use of the public methods of this component. This method should
- * be the last one called on a given instance of this component.
- *
- * @throws LifecycleException if this component detects a fatal error that needs to be reported
- */
- @Override
- public void stopInternal() throws LifecycleException {
- stopInternalBase();
- if (getLogger().isDebugEnabled()) {
- getLogger().debug(this + ": Stopping");
- }
-
- try {
- unload();
- } catch (IOException e) {
- getLogger().error("Unable to unload sessions", e);
- }
-
- started.set(false);
- lifecycle.fireLifecycleEvent(STOP_EVENT, null);
-
- // StandardManager expires all Sessions here.
- // All Sessions are not known by this Manager.
-
- super.destroyInternal();
-
- // Clear any sessions to be touched
- getSessionsToTouch().clear();
-
- // Cancel the timer
- cancelTimer();
-
- // Unregister the JVM route valve
- unregisterJvmRouteBinderValve();
-
- if (isCommitValveEnabled()) {
- unregisterCommitSessionValve();
- }
-
- setLifecycleState(LifecycleState.STOPPING);
- }
-
- void stopInternalBase() throws LifecycleException {
- super.stopInternal();
- }
-
- void destroyInternalBase() throws LifecycleException {
- super.destroyInternal();
- }
-
- /**
- * Add a lifecycle event listener to this component.
- *
- * @param listener The listener to add
- */
- @Override
- public void addLifecycleListener(LifecycleListener listener) {
- lifecycle.addLifecycleListener(listener);
- }
-
- /**
- * Get the lifecycle listeners associated with this lifecycle. If this Lifecycle has no listeners
- * registered, a zero-length array is returned.
- */
- @Override
- public LifecycleListener[] findLifecycleListeners() {
- return lifecycle.findLifecycleListeners();
- }
-
- /**
- * Remove a lifecycle event listener from this component.
- *
- * @param listener The listener to remove
- */
- @Override
- public void removeLifecycleListener(LifecycleListener listener) {
- lifecycle.removeLifecycleListener(listener);
- }
-
- @Override
- protected StandardSession getNewSession() {
- return new DeltaSession7(this);
- }
-
- @Override
- protected Tomcat7CommitSessionValve createCommitSessionValve() {
- return new Tomcat7CommitSessionValve();
- }
-
-}
diff --git a/extensions/geode-modules-tomcat7/src/test/java/org/apache/geode/modules/session/catalina/DeltaSession7Test.java b/extensions/geode-modules-tomcat7/src/test/java/org/apache/geode/modules/session/catalina/DeltaSession7Test.java
deleted file mode 100644
index dd53c9c99b25..000000000000
--- a/extensions/geode-modules-tomcat7/src/test/java/org/apache/geode/modules/session/catalina/DeltaSession7Test.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-
-package org.apache.geode.modules.session.catalina;
-
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.spy;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyNoMoreInteractions;
-import static org.mockito.Mockito.when;
-
-import java.io.IOException;
-
-import javax.servlet.http.HttpSessionAttributeListener;
-import javax.servlet.http.HttpSessionBindingEvent;
-
-import org.apache.catalina.Context;
-import org.apache.catalina.Manager;
-import org.apache.juli.logging.Log;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.ArgumentCaptor;
-
-import org.apache.geode.internal.util.BlobHelper;
-
-public class DeltaSession7Test extends AbstractDeltaSessionTest {
- final HttpSessionAttributeListener listener = mock(HttpSessionAttributeListener.class);
-
- @Before
- @Override
- public void setup() {
- super.setup();
-
- final Context context = mock(Context.class);
- when(manager.getContainer()).thenReturn(context);
- when(context.getApplicationEventListeners()).thenReturn(new Object[] {listener});
- when(context.getLogger()).thenReturn(mock(Log.class));
- }
-
- @Override
- protected DeltaSession7 newDeltaSession(Manager manager) {
- return new DeltaSession7(manager);
- }
-
- @Test
- public void serializedAttributesNotLeakedInAttributeReplaceEvent() throws IOException {
- final DeltaSession7 session = spy(new DeltaSession7(manager));
- session.setValid(true);
- final String name = "attribute";
- final Object value1 = "value1";
- final byte[] serializedValue1 = BlobHelper.serializeToBlob(value1);
- // simulates initial deserialized state with serialized attribute values.
- session.getAttributes().put(name, serializedValue1);
-
- final Object value2 = "value2";
- session.setAttribute(name, value2);
-
- final ArgumentCaptor event =
- ArgumentCaptor.forClass(HttpSessionBindingEvent.class);
- verify(listener).attributeReplaced(event.capture());
- verifyNoMoreInteractions(listener);
- assertThat(event.getValue().getValue()).isEqualTo(value1);
- }
-
- @Test
- public void serializedAttributesNotLeakedInAttributeRemovedEvent() throws IOException {
- final DeltaSession7 session = spy(new DeltaSession7(manager));
- session.setValid(true);
- final String name = "attribute";
- final Object value1 = "value1";
- final byte[] serializedValue1 = BlobHelper.serializeToBlob(value1);
- // simulates initial deserialized state with serialized attribute values.
- session.getAttributes().put(name, serializedValue1);
-
- session.removeAttribute(name);
-
- final ArgumentCaptor event =
- ArgumentCaptor.forClass(HttpSessionBindingEvent.class);
- verify(listener).attributeRemoved(event.capture());
- verifyNoMoreInteractions(listener);
- assertThat(event.getValue().getValue()).isEqualTo(value1);
- }
-
- @Test
- public void serializedAttributesLeakedInAttributeReplaceEventWhenPreferDeserializedFormFalse()
- throws IOException {
- setPreferDeserializedFormFalse();
-
- final DeltaSession7 session = spy(new DeltaSession7(manager));
- session.setValid(true);
- final String name = "attribute";
- final Object value1 = "value1";
- final byte[] serializedValue1 = BlobHelper.serializeToBlob(value1);
- // simulates initial deserialized state with serialized attribute values.
- session.getAttributes().put(name, serializedValue1);
-
- final Object value2 = "value2";
- session.setAttribute(name, value2);
-
- final ArgumentCaptor event =
- ArgumentCaptor.forClass(HttpSessionBindingEvent.class);
- verify(listener).attributeReplaced(event.capture());
- verifyNoMoreInteractions(listener);
- assertThat(event.getValue().getValue()).isInstanceOf(byte[].class);
- }
-
- @Test
- public void serializedAttributesLeakedInAttributeRemovedEventWhenPreferDeserializedFormFalse()
- throws IOException {
- setPreferDeserializedFormFalse();
-
- final DeltaSession7 session = spy(new DeltaSession7(manager));
- session.setValid(true);
- final String name = "attribute";
- final Object value1 = "value1";
- final byte[] serializedValue1 = BlobHelper.serializeToBlob(value1);
- // simulates initial deserialized state with serialized attribute values.
- session.getAttributes().put(name, serializedValue1);
-
- session.removeAttribute(name);
-
- final ArgumentCaptor event =
- ArgumentCaptor.forClass(HttpSessionBindingEvent.class);
- verify(listener).attributeRemoved(event.capture());
- verifyNoMoreInteractions(listener);
- assertThat(event.getValue().getValue()).isInstanceOf(byte[].class);
- }
-
- @SuppressWarnings("deprecation")
- protected void setPreferDeserializedFormFalse() {
- when(manager.getPreferDeserializedForm()).thenReturn(false);
- }
-
-}
diff --git a/extensions/geode-modules-tomcat7/src/test/java/org/apache/geode/modules/session/catalina/Tomcat7CommitSessionOutputBufferTest.java b/extensions/geode-modules-tomcat7/src/test/java/org/apache/geode/modules/session/catalina/Tomcat7CommitSessionOutputBufferTest.java
deleted file mode 100644
index 20facaf916a2..000000000000
--- a/extensions/geode-modules-tomcat7/src/test/java/org/apache/geode/modules/session/catalina/Tomcat7CommitSessionOutputBufferTest.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-
-package org.apache.geode.modules.session.catalina;
-
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.mockito.Mockito.inOrder;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-import java.io.IOException;
-
-import org.apache.coyote.OutputBuffer;
-import org.apache.coyote.Response;
-import org.apache.tomcat.util.buf.ByteChunk;
-import org.junit.Test;
-import org.mockito.InOrder;
-
-public class Tomcat7CommitSessionOutputBufferTest {
-
- final SessionCommitter sessionCommitter = mock(SessionCommitter.class);
- final OutputBuffer delegate = mock(OutputBuffer.class);
-
- final Tomcat7CommitSessionOutputBuffer commitSesssionOutputBuffer =
- new Tomcat7CommitSessionOutputBuffer(sessionCommitter, delegate);
-
- @Test
- public void doWrite() throws IOException {
- final ByteChunk byteChunk = new ByteChunk();
- final Response response = new Response();
-
- commitSesssionOutputBuffer.doWrite(byteChunk, response);
-
- final InOrder inOrder = inOrder(sessionCommitter, delegate);
- inOrder.verify(sessionCommitter).commit();
- inOrder.verify(delegate).doWrite(byteChunk, response);
- inOrder.verifyNoMoreInteractions();
- }
-
-
- @Test
- public void getBytesWritten() {
- when(delegate.getBytesWritten()).thenReturn(42L);
-
- assertThat(commitSesssionOutputBuffer.getBytesWritten()).isEqualTo(42L);
-
- final InOrder inOrder = inOrder(sessionCommitter, delegate);
- inOrder.verify(delegate).getBytesWritten();
- inOrder.verifyNoMoreInteractions();
- }
-}
diff --git a/extensions/geode-modules-tomcat7/src/test/java/org/apache/geode/modules/session/catalina/Tomcat7CommitSessionValveTest.java b/extensions/geode-modules-tomcat7/src/test/java/org/apache/geode/modules/session/catalina/Tomcat7CommitSessionValveTest.java
deleted file mode 100644
index c9be9b26fded..000000000000
--- a/extensions/geode-modules-tomcat7/src/test/java/org/apache/geode/modules/session/catalina/Tomcat7CommitSessionValveTest.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-
-package org.apache.geode.modules.session.catalina;
-
-import static org.apache.geode.modules.session.catalina.Tomcat7CommitSessionValve.getOutputBuffer;
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.inOrder;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.reset;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-import org.apache.catalina.Context;
-import org.apache.catalina.connector.Connector;
-import org.apache.catalina.connector.Request;
-import org.apache.catalina.connector.Response;
-import org.apache.coyote.OutputBuffer;
-import org.apache.tomcat.util.buf.ByteChunk;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.InOrder;
-
-
-public class Tomcat7CommitSessionValveTest {
-
- private final Tomcat7CommitSessionValve valve = new Tomcat7CommitSessionValve();
- private final OutputBuffer outputBuffer = mock(OutputBuffer.class);
- private Response response;
- private org.apache.coyote.Response coyoteResponse;
-
- @Before
- public void before() {
- final Connector connector = mock(Connector.class);
-
- final Context context = mock(Context.class);
-
- final Request request = mock(Request.class);
- doReturn(context).when(request).getContext();
-
- coyoteResponse = new org.apache.coyote.Response();
- coyoteResponse.setOutputBuffer(outputBuffer);
-
- response = new Response();
- response.setConnector(connector);
- response.setRequest(request);
- response.setCoyoteResponse(coyoteResponse);
- }
-
- @Test
- public void wrappedOutputBufferForwardsToDelegate() throws IOException {
- wrappedOutputBufferForwardsToDelegate(new byte[] {'a', 'b', 'c'});
- }
-
- @Test
- public void recycledResponseObjectDoesNotWrapAlreadyWrappedOutputBuffer() throws IOException {
- wrappedOutputBufferForwardsToDelegate(new byte[] {'a', 'b', 'c'});
- response.recycle();
- reset(outputBuffer);
- wrappedOutputBufferForwardsToDelegate(new byte[] {'d', 'e', 'f'});
- }
-
- private void wrappedOutputBufferForwardsToDelegate(final byte[] bytes) throws IOException {
- final OutputStream outputStream =
- valve.wrapResponse(response).getResponse().getOutputStream();
- outputStream.write(bytes);
- outputStream.flush();
-
- final ArgumentCaptor byteChunk = ArgumentCaptor.forClass(ByteChunk.class);
-
- final InOrder inOrder = inOrder(outputBuffer);
- inOrder.verify(outputBuffer).doWrite(byteChunk.capture(), any());
- inOrder.verifyNoMoreInteractions();
-
- final OutputBuffer wrappedOutputBuffer = getOutputBuffer(coyoteResponse);
- assertThat(wrappedOutputBuffer).isInstanceOf(Tomcat7CommitSessionOutputBuffer.class);
- assertThat(((Tomcat7CommitSessionOutputBuffer) wrappedOutputBuffer).getDelegate())
- .isNotInstanceOf(Tomcat7CommitSessionOutputBuffer.class);
-
- assertThat(byteChunk.getValue().getBytes()).contains(bytes);
- }
-}
diff --git a/extensions/geode-modules-tomcat7/src/test/java/org/apache/geode/modules/session/catalina/Tomcat7DeltaSessionManagerTest.java b/extensions/geode-modules-tomcat7/src/test/java/org/apache/geode/modules/session/catalina/Tomcat7DeltaSessionManagerTest.java
deleted file mode 100644
index 2d900bda902d..000000000000
--- a/extensions/geode-modules-tomcat7/src/test/java/org/apache/geode/modules/session/catalina/Tomcat7DeltaSessionManagerTest.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-
-package org.apache.geode.modules.session.catalina;
-
-
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.mockito.Mockito.doNothing;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.spy;
-import static org.mockito.Mockito.verify;
-
-import java.io.IOException;
-
-import org.apache.catalina.Context;
-import org.apache.catalina.LifecycleException;
-import org.apache.catalina.LifecycleState;
-import org.apache.catalina.Pipeline;
-import org.junit.Before;
-import org.junit.Test;
-
-import org.apache.geode.internal.cache.GemFireCacheImpl;
-
-public class Tomcat7DeltaSessionManagerTest
- extends AbstractDeltaSessionManagerTest {
- private Pipeline pipeline;
-
- @Before
- public void setup() {
- manager = spy(new Tomcat7DeltaSessionManager());
- initTest();
- pipeline = mock(Pipeline.class);
- }
-
- @Test
- public void startInternalSucceedsInitialRun()
- throws LifecycleException, IOException, ClassNotFoundException {
- doNothing().when(manager).startInternalBase();
- doReturn(true).when(manager).isCommitValveEnabled();
- doReturn(cache).when(manager).getAnyCacheInstance();
- doReturn(true).when((GemFireCacheImpl) cache).isClient();
- doNothing().when(manager).initSessionCache();
- doReturn(pipeline).when(manager).getPipeline();
-
- // Unit testing for load is handled in the parent DeltaSessionManagerJUnitTest class
- doNothing().when(manager).load();
-
- doNothing().when(manager)
- .setLifecycleState(LifecycleState.STARTING);
-
- assertThat(manager.started).isFalse();
- manager.startInternal();
- assertThat(manager.started).isTrue();
- verify(manager).setLifecycleState(LifecycleState.STARTING);
- }
-
- @Test
- public void startInternalDoesNotReinitializeManagerOnSubsequentCalls()
- throws LifecycleException, IOException, ClassNotFoundException {
- doNothing().when(manager).startInternalBase();
- doReturn(true).when(manager).isCommitValveEnabled();
- doReturn(cache).when(manager).getAnyCacheInstance();
- doReturn(true).when((GemFireCacheImpl) cache).isClient();
- doNothing().when(manager).initSessionCache();
- doReturn(pipeline).when(manager).getPipeline();
-
- // Unit testing for load is handled in the parent DeltaSessionManagerJUnitTest class
- doNothing().when(manager).load();
-
- doNothing().when(manager)
- .setLifecycleState(LifecycleState.STARTING);
-
- assertThat(manager.started).isFalse();
- manager.startInternal();
-
- // Verify that various initialization actions were performed
- assertThat(manager.started).isTrue();
- verify(manager).initializeSessionCache();
- verify(manager).setLifecycleState(LifecycleState.STARTING);
-
- // Rerun startInternal
- manager.startInternal();
-
- // Verify that the initialization actions were still only performed one time
- verify(manager).initializeSessionCache();
- verify(manager).setLifecycleState(LifecycleState.STARTING);
- }
-
- @Test
- public void stopInternal() throws LifecycleException, IOException {
- doNothing().when(manager).startInternalBase();
- doNothing().when(manager).destroyInternalBase();
- doReturn(true).when(manager).isCommitValveEnabled();
-
- // Unit testing for unload is handled in the parent DeltaSessionManagerJUnitTest class
- doNothing().when(manager).unload();
-
- doNothing().when(manager)
- .setLifecycleState(LifecycleState.STOPPING);
-
- manager.stopInternal();
-
- assertThat(manager.started).isFalse();
- verify(manager).setLifecycleState(LifecycleState.STOPPING);
- }
-
- @Test
- public void setContainerSetsProperContainerAndMaxInactiveInterval() {
- final Context container = mock(Context.class);
- final int containerMaxInactiveInterval = 3;
-
- doReturn(containerMaxInactiveInterval).when(container).getSessionTimeout();
-
- manager.setContainer(container);
- verify(manager).setMaxInactiveInterval(containerMaxInactiveInterval * 60);
- }
-}
diff --git a/extensions/geode-modules-tomcat8/build.gradle b/extensions/geode-modules-tomcat8/build.gradle
index a24651dd4469..2564d754870a 100644
--- a/extensions/geode-modules-tomcat8/build.gradle
+++ b/extensions/geode-modules-tomcat8/build.gradle
@@ -37,12 +37,17 @@ dependencies {
// test
+ testCompileOnly(platform(project(':boms:geode-all-bom')))
+ testCompileOnly('junit:junit')
+
testImplementation(project(':extensions:geode-modules-test'))
- testImplementation('junit:junit')
+ testImplementation('org.junit.jupiter:junit-jupiter-api')
testImplementation('org.assertj:assertj-core')
testImplementation('org.mockito:mockito-core')
testImplementation('org.apache.tomcat:tomcat-catalina:' + DependencyConstraints.get('tomcat8.version'))
+ testRuntimeOnly('org.junit.vintage:junit-vintage-engine')
+ testRuntimeOnly('org.junit.jupiter:junit-jupiter-engine')
// integrationTest
integrationTestImplementation(project(':extensions:geode-modules-test'))
diff --git a/extensions/geode-modules-tomcat8/src/distributedTest/java/org/apache/geode/modules/session/TestSessionsTomcat8Base.java b/extensions/geode-modules-tomcat8/src/distributedTest/java/org/apache/geode/modules/session/TestSessionsTomcat8Base.java
index e7cec09ebf4a..20c851ee2713 100644
--- a/extensions/geode-modules-tomcat8/src/distributedTest/java/org/apache/geode/modules/session/TestSessionsTomcat8Base.java
+++ b/extensions/geode-modules-tomcat8/src/distributedTest/java/org/apache/geode/modules/session/TestSessionsTomcat8Base.java
@@ -14,9 +14,9 @@
*/
package org.apache.geode.modules.session;
+import static java.util.concurrent.TimeUnit.SECONDS;
import static org.assertj.core.api.Assertions.assertThat;
-import java.beans.PropertyChangeEvent;
import java.io.PrintWriter;
import java.io.Serializable;
@@ -34,7 +34,7 @@
import org.apache.geode.cache.Region;
import org.apache.geode.logging.internal.log4j.api.LogService;
-import org.apache.geode.modules.session.catalina.DeltaSessionManager;
+import org.apache.geode.modules.session.catalina.Tomcat8DeltaSessionManager;
import org.apache.geode.test.dunit.rules.CacheRule;
import org.apache.geode.test.dunit.rules.DistributedRule;
@@ -51,7 +51,7 @@ public abstract class TestSessionsTomcat8Base implements Serializable {
EmbeddedTomcat8 server;
StandardWrapper servlet;
Region region;
- DeltaSessionManager sessionManager;
+ Tomcat8DeltaSessionManager sessionManager;
public void basicConnectivityCheck() throws Exception {
WebConversation wc = new WebConversation();
@@ -177,8 +177,8 @@ public void testInvalidate() throws Exception {
*/
@Test
public void testSessionExpiration1() throws Exception {
- // TestSessions only live for a second
- sessionManager.setMaxInactiveInterval(1);
+ // TestSessions only live for a minute
+ sessionManager.getContext().setSessionTimeout(1);
String key = "value_testSessionExpiration1";
String value = "Foo";
@@ -193,7 +193,7 @@ public void testSessionExpiration1() throws Exception {
wc.getResponse(req);
// Sleep a while
- Thread.sleep(65000);
+ SECONDS.sleep(65);
// The attribute should not be accessible now...
req.setParameter("cmd", QueryCommand.GET.name());
@@ -203,20 +203,6 @@ public void testSessionExpiration1() throws Exception {
assertThat(response.getText()).isEmpty();
}
- /**
- * Test setting the session expiration via a property change as would happen under normal
- * deployment conditions.
- */
- @Test
- public void testSessionExpiration2() {
- // TestSessions only live for a minute
- sessionManager
- .propertyChange(new PropertyChangeEvent(server.getRootContext(), "sessionTimeout", 30, 1));
-
- // Check that the value has been set to 60 seconds
- assertThat(sessionManager.getMaxInactiveInterval()).isEqualTo(60);
- }
-
/**
* Test expiration of a session by the tomcat container, rather than gemfire expiration
*/
diff --git a/extensions/geode-modules-tomcat8/src/distributedTest/java/org/apache/geode/modules/session/Tomcat8SessionsClientServerDUnitTest.java b/extensions/geode-modules-tomcat8/src/distributedTest/java/org/apache/geode/modules/session/Tomcat8SessionsClientServerDUnitTest.java
index 9de6885dec38..c833b50f177d 100644
--- a/extensions/geode-modules-tomcat8/src/distributedTest/java/org/apache/geode/modules/session/Tomcat8SessionsClientServerDUnitTest.java
+++ b/extensions/geode-modules-tomcat8/src/distributedTest/java/org/apache/geode/modules/session/Tomcat8SessionsClientServerDUnitTest.java
@@ -31,14 +31,11 @@
import org.apache.geode.cache.client.ClientCacheFactory;
import org.apache.geode.internal.AvailablePortHelper;
import org.apache.geode.modules.session.catalina.ClientServerCacheLifecycleListener;
-import org.apache.geode.modules.session.catalina.DeltaSessionManager;
import org.apache.geode.modules.session.catalina.Tomcat8DeltaSessionManager;
import org.apache.geode.test.dunit.rules.ClusterStartupRule;
import org.apache.geode.test.dunit.rules.MemberVM;
import org.apache.geode.test.junit.categories.SessionTest;
-
-
@Category(SessionTest.class)
public class Tomcat8SessionsClientServerDUnitTest extends TestSessionsTomcat8Base {
@@ -63,7 +60,6 @@ public void setUp() throws Exception {
assertThat(port).isGreaterThan(0);
server = new EmbeddedTomcat8(port, "JVM-1");
- assertThat(server).isNotNull();
ClientCacheFactory cacheFactory = new ClientCacheFactory();
assertThat(cacheFactory).isNotNull();
@@ -72,17 +68,13 @@ public void setUp() throws Exception {
clientCache = cacheFactory.create();
assertThat(clientCache).isNotNull();
- DeltaSessionManager manager = new Tomcat8DeltaSessionManager();
- assertThat(manager).isNotNull();
-
ClientServerCacheLifecycleListener listener = new ClientServerCacheLifecycleListener();
- assertThat(listener).isNotNull();
listener.setProperty(MCAST_PORT, "0");
listener.setProperty(LOG_LEVEL, "config");
server.addLifecycleListener(listener);
- sessionManager = manager;
+ sessionManager = new Tomcat8DeltaSessionManager();
sessionManager.setEnableCommitValve(true);
server.getRootContext().setManager(sessionManager);
@@ -96,7 +88,7 @@ public void setUp() throws Exception {
region = sessionManager.getSessionCache().getSessionRegion();
assertThat(region).isNotNull();
- sessionManager.getTheContext().setSessionTimeout(30);
+ sessionManager.getContext().setSessionTimeout(30);
await().until(() -> sessionManager.getState() == LifecycleState.STARTED);
basicConnectivityCheck();
diff --git a/extensions/geode-modules-tomcat8/src/distributedTest/java/org/apache/geode/modules/session/Tomcat8SessionsDUnitTest.java b/extensions/geode-modules-tomcat8/src/distributedTest/java/org/apache/geode/modules/session/Tomcat8SessionsDUnitTest.java
index 67db3227c1ed..584463941f97 100644
--- a/extensions/geode-modules-tomcat8/src/distributedTest/java/org/apache/geode/modules/session/Tomcat8SessionsDUnitTest.java
+++ b/extensions/geode-modules-tomcat8/src/distributedTest/java/org/apache/geode/modules/session/Tomcat8SessionsDUnitTest.java
@@ -51,7 +51,7 @@ public void setUp() throws Exception {
// Can only retrieve the region once the container has started up (& the cache has started too).
region = sessionManager.getSessionCache().getSessionRegion();
- sessionManager.getTheContext().setSessionTimeout(30);
+ sessionManager.getContext().setSessionTimeout(30);
region.clear();
basicConnectivityCheck();
}
diff --git a/extensions/geode-modules-tomcat8/src/main/java/org/apache/geode/modules/session/catalina/Tomcat8DeltaSessionManager.java b/extensions/geode-modules-tomcat8/src/main/java/org/apache/geode/modules/session/catalina/Tomcat8DeltaSessionManager.java
index 520846403832..36eab0b435c5 100644
--- a/extensions/geode-modules-tomcat8/src/main/java/org/apache/geode/modules/session/catalina/Tomcat8DeltaSessionManager.java
+++ b/extensions/geode-modules-tomcat8/src/main/java/org/apache/geode/modules/session/catalina/Tomcat8DeltaSessionManager.java
@@ -17,7 +17,6 @@
import java.io.IOException;
-import org.apache.catalina.Context;
import org.apache.catalina.LifecycleException;
import org.apache.catalina.LifecycleState;
import org.apache.catalina.Pipeline;
@@ -128,14 +127,9 @@ void destroyInternalBase() throws LifecycleException {
super.destroyInternal();
}
- @Override
- public int getMaxInactiveInterval() {
- return getContext().getSessionTimeout();
- }
-
@Override
protected Pipeline getPipeline() {
- return getTheContext().getPipeline();
+ return getContext().getPipeline();
}
@Override
@@ -143,16 +137,6 @@ protected Tomcat8CommitSessionValve createCommitSessionValve() {
return new Tomcat8CommitSessionValve();
}
- @Override
- public Context getTheContext() {
- return getContext();
- }
-
- @Override
- public void setMaxInactiveInterval(final int interval) {
- getContext().setSessionTimeout(interval);
- }
-
@Override
protected StandardSession getNewSession() {
return new DeltaSession8(this);
diff --git a/extensions/geode-modules-tomcat8/src/test/java/org/apache/geode/modules/session/catalina/Tomcat8DeltaSessionManagerTest.java b/extensions/geode-modules-tomcat8/src/test/java/org/apache/geode/modules/session/catalina/Tomcat8DeltaSessionManagerTest.java
index 9741af87b474..34ab05a0a0cb 100644
--- a/extensions/geode-modules-tomcat8/src/test/java/org/apache/geode/modules/session/catalina/Tomcat8DeltaSessionManagerTest.java
+++ b/extensions/geode-modules-tomcat8/src/test/java/org/apache/geode/modules/session/catalina/Tomcat8DeltaSessionManagerTest.java
@@ -15,7 +15,6 @@
package org.apache.geode.modules.session.catalina;
-
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.doReturn;
@@ -28,8 +27,8 @@
import org.apache.catalina.LifecycleException;
import org.apache.catalina.LifecycleState;
import org.apache.catalina.Pipeline;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.apache.geode.internal.cache.GemFireCacheImpl;
@@ -37,8 +36,8 @@ public class Tomcat8DeltaSessionManagerTest
extends AbstractDeltaSessionManagerTest {
private Pipeline pipeline;
- @Before
- public void setup() {
+ @BeforeEach
+ void setup() {
manager = spy(new Tomcat8DeltaSessionManager());
initTest();
pipeline = mock(Pipeline.class);
@@ -46,7 +45,7 @@ public void setup() {
}
@Test
- public void startInternalSucceedsInitialRun()
+ void startInternalSucceedsInitialRun()
throws LifecycleException, IOException, ClassNotFoundException {
doNothing().when(manager).startInternalBase();
doReturn(true).when(manager).isCommitValveEnabled();
@@ -68,7 +67,7 @@ public void startInternalSucceedsInitialRun()
}
@Test
- public void startInternalDoesNotReinitializeManagerOnSubsequentCalls()
+ void startInternalDoesNotReinitializeManagerOnSubsequentCalls()
throws LifecycleException, IOException, ClassNotFoundException {
doNothing().when(manager).startInternalBase();
doReturn(true).when(manager).isCommitValveEnabled();
@@ -100,7 +99,7 @@ public void startInternalDoesNotReinitializeManagerOnSubsequentCalls()
}
@Test
- public void stopInternal() throws LifecycleException, IOException {
+ void stopInternal() throws LifecycleException, IOException {
doNothing().when(manager).startInternalBase();
doNothing().when(manager).destroyInternalBase();
doReturn(true).when(manager).isCommitValveEnabled();
diff --git a/extensions/geode-modules-tomcat8/src/test/resources/expected-pom.xml b/extensions/geode-modules-tomcat8/src/test/resources/expected-pom.xml
index 5819c519f638..1f5188219495 100644
--- a/extensions/geode-modules-tomcat8/src/test/resources/expected-pom.xml
+++ b/extensions/geode-modules-tomcat8/src/test/resources/expected-pom.xml
@@ -17,7 +17,7 @@
limitations under the License.
-->
4.0.0
- org.apache.geode
+ com.vmware.gemfiregeode-modules-tomcat8${version}Apache Geode
@@ -37,7 +37,7 @@
- org.apache.geode
+ com.vmware.gemfiregeode-all-bom${version}pom
@@ -47,12 +47,12 @@
- org.apache.geode
+ com.vmware.gemfiregeode-corecompile
- org.apache.geode
+ com.vmware.gemfiregeode-modulescompile
diff --git a/extensions/geode-modules-tomcat9/build.gradle b/extensions/geode-modules-tomcat9/build.gradle
index 542ba93137a4..58f04a79566f 100644
--- a/extensions/geode-modules-tomcat9/build.gradle
+++ b/extensions/geode-modules-tomcat9/build.gradle
@@ -37,12 +37,18 @@ dependencies {
// test
+ testCompileOnly(platform(project(':boms:geode-all-bom')))
+ testCompileOnly('junit:junit')
+
testImplementation(project(':extensions:geode-modules-test'))
- testImplementation('junit:junit')
+ testImplementation('org.junit.jupiter:junit-jupiter-api')
testImplementation('org.assertj:assertj-core')
testImplementation('org.mockito:mockito-core')
testImplementation('org.apache.tomcat:tomcat-catalina:' + DependencyConstraints.get('tomcat9.version'))
+ testRuntimeOnly('org.junit.vintage:junit-vintage-engine')
+ testRuntimeOnly('org.junit.jupiter:junit-jupiter-engine')
+
// integrationTest
integrationTestImplementation(project(':extensions:geode-modules-test'))
diff --git a/extensions/geode-modules-tomcat9/src/main/java/org/apache/geode/modules/session/catalina/Tomcat9DeltaSessionManager.java b/extensions/geode-modules-tomcat9/src/main/java/org/apache/geode/modules/session/catalina/Tomcat9DeltaSessionManager.java
index e3ce830d60b9..5432c9204a2f 100644
--- a/extensions/geode-modules-tomcat9/src/main/java/org/apache/geode/modules/session/catalina/Tomcat9DeltaSessionManager.java
+++ b/extensions/geode-modules-tomcat9/src/main/java/org/apache/geode/modules/session/catalina/Tomcat9DeltaSessionManager.java
@@ -16,7 +16,6 @@
import java.io.IOException;
-import org.apache.catalina.Context;
import org.apache.catalina.LifecycleException;
import org.apache.catalina.LifecycleState;
import org.apache.catalina.Pipeline;
@@ -127,14 +126,9 @@ void destroyInternalBase() throws LifecycleException {
super.destroyInternal();
}
- @Override
- public int getMaxInactiveInterval() {
- return getContext().getSessionTimeout();
- }
-
@Override
protected Pipeline getPipeline() {
- return getTheContext().getPipeline();
+ return getContext().getPipeline();
}
@Override
@@ -142,16 +136,6 @@ protected Tomcat9CommitSessionValve createCommitSessionValve() {
return new Tomcat9CommitSessionValve();
}
- @Override
- public Context getTheContext() {
- return getContext();
- }
-
- @Override
- public void setMaxInactiveInterval(final int interval) {
- getContext().setSessionTimeout(interval);
- }
-
@Override
protected StandardSession getNewSession() {
return new DeltaSession9(this);
diff --git a/extensions/geode-modules-tomcat9/src/test/java/org/apache/geode/modules/session/catalina/Tomcat9DeltaSessionManagerTest.java b/extensions/geode-modules-tomcat9/src/test/java/org/apache/geode/modules/session/catalina/Tomcat9DeltaSessionManagerTest.java
index 4513f781d39a..255146820cf5 100644
--- a/extensions/geode-modules-tomcat9/src/test/java/org/apache/geode/modules/session/catalina/Tomcat9DeltaSessionManagerTest.java
+++ b/extensions/geode-modules-tomcat9/src/test/java/org/apache/geode/modules/session/catalina/Tomcat9DeltaSessionManagerTest.java
@@ -15,7 +15,6 @@
package org.apache.geode.modules.session.catalina;
-
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.doReturn;
@@ -28,8 +27,8 @@
import org.apache.catalina.LifecycleException;
import org.apache.catalina.LifecycleState;
import org.apache.catalina.Pipeline;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.apache.geode.internal.cache.GemFireCacheImpl;
@@ -37,8 +36,8 @@ public class Tomcat9DeltaSessionManagerTest
extends AbstractDeltaSessionManagerTest {
private Pipeline pipeline;
- @Before
- public void setup() {
+ @BeforeEach
+ void setup() {
manager = spy(new Tomcat9DeltaSessionManager());
initTest();
pipeline = mock(Pipeline.class);
@@ -46,7 +45,7 @@ public void setup() {
}
@Test
- public void startInternalSucceedsInitialRun()
+ void startInternalSucceedsInitialRun()
throws LifecycleException, IOException, ClassNotFoundException {
doNothing().when(manager).startInternalBase();
doReturn(true).when(manager).isCommitValveEnabled();
@@ -68,7 +67,7 @@ public void startInternalSucceedsInitialRun()
}
@Test
- public void startInternalDoesNotReinitializeManagerOnSubsequentCalls()
+ void startInternalDoesNotReinitializeManagerOnSubsequentCalls()
throws LifecycleException, IOException, ClassNotFoundException {
doNothing().when(manager).startInternalBase();
doReturn(true).when(manager).isCommitValveEnabled();
@@ -100,7 +99,7 @@ public void startInternalDoesNotReinitializeManagerOnSubsequentCalls()
}
@Test
- public void stopInternal() throws LifecycleException, IOException {
+ void stopInternal() throws LifecycleException, IOException {
doNothing().when(manager).startInternalBase();
doNothing().when(manager).destroyInternalBase();
doReturn(true).when(manager).isCommitValveEnabled();
diff --git a/extensions/geode-modules-tomcat9/src/test/resources/expected-pom.xml b/extensions/geode-modules-tomcat9/src/test/resources/expected-pom.xml
index 6187a17ffdb4..320b8c0c8752 100644
--- a/extensions/geode-modules-tomcat9/src/test/resources/expected-pom.xml
+++ b/extensions/geode-modules-tomcat9/src/test/resources/expected-pom.xml
@@ -17,7 +17,7 @@
limitations under the License.
-->
4.0.0
- org.apache.geode
+ com.vmware.gemfiregeode-modules-tomcat9${version}Apache Geode
@@ -37,7 +37,7 @@
- org.apache.geode
+ com.vmware.gemfiregeode-all-bom${version}pom
@@ -47,12 +47,12 @@
- org.apache.geode
+ com.vmware.gemfiregeode-corecompile
- org.apache.geode
+ com.vmware.gemfiregeode-modulescompile
diff --git a/extensions/geode-modules/build.gradle b/extensions/geode-modules/build.gradle
index d32ad3315341..534f31a8f524 100644
--- a/extensions/geode-modules/build.gradle
+++ b/extensions/geode-modules/build.gradle
@@ -27,39 +27,44 @@ evaluationDependsOn(":geode-core")
dependencies {
// main
implementation(platform(project(':boms:geode-all-bom')))
- api(project(':geode-logging'))
implementation(project(':geode-membership'))
- api(project(':geode-common'))
implementation(project(':geode-serialization'))
implementation('org.slf4j:slf4j-api')
+ implementation('org.apache.commons:commons-lang3')
+ api(project(':geode-logging'))
+ api(project(':geode-common'))
api(project(':geode-core'))
compileOnly(platform(project(':boms:geode-all-bom')))
compileOnly('javax.servlet:javax.servlet-api')
- compileOnly('org.apache.tomcat:catalina-ha:' + DependencyConstraints.get('tomcat6.version'))
+ compileOnly('org.apache.tomcat:tomcat-catalina-ha:' + DependencyConstraints.get('tomcat8.version'))
- implementation('org.apache.commons:commons-lang3')
// test
+ testCompileOnly(platform(project(':boms:geode-all-bom')))
+ testCompileOnly('junit:junit')
+
testImplementation('org.apache.bcel:bcel')
- testImplementation('junit:junit')
- testRuntimeOnly('org.junit.vintage:junit-vintage-engine')
+ testImplementation('org.junit.jupiter:junit-jupiter-api')
testImplementation('org.assertj:assertj-core')
testImplementation('org.mockito:mockito-core')
- testImplementation('org.apache.tomcat:catalina-ha:' + DependencyConstraints.get('tomcat6.version'))
+ testImplementation('org.apache.tomcat:tomcat-catalina-ha:' + DependencyConstraints.get('tomcat8.version'))
+
+ testRuntimeOnly('org.junit.vintage:junit-vintage-engine')
+ testRuntimeOnly('org.junit.jupiter:junit-jupiter-engine')
// integrationTest
integrationTestImplementation(project(':extensions:geode-modules-test'))
integrationTestImplementation(project(':geode-dunit'))
integrationTestImplementation('pl.pragmatists:JUnitParams')
- integrationTestImplementation('org.apache.tomcat:catalina-ha:' + DependencyConstraints.get('tomcat6.version'))
+ integrationTestImplementation('org.apache.tomcat:tomcat-catalina-ha:' + DependencyConstraints.get('tomcat8.version'))
// distributedTest
distributedTestImplementation(project(':geode-dunit'))
- distributedTestImplementation('org.apache.tomcat:catalina-ha:' + DependencyConstraints.get('tomcat6.version'))
+ distributedTestImplementation('org.apache.tomcat:tomcat-catalina-ha:' + DependencyConstraints.get('tomcat8.version'))
}
sonarqube {
diff --git a/extensions/geode-modules/src/integrationTest/java/org/apache/geode/modules/session/Tomcat6SessionsTest.java b/extensions/geode-modules/src/integrationTest/java/org/apache/geode/modules/session/Tomcat6SessionsTest.java
deleted file mode 100644
index 47da3f4c8618..000000000000
--- a/extensions/geode-modules/src/integrationTest/java/org/apache/geode/modules/session/Tomcat6SessionsTest.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.modules.session;
-
-import org.junit.BeforeClass;
-import org.junit.experimental.categories.Category;
-
-import org.apache.geode.modules.session.catalina.Tomcat6DeltaSessionManager;
-import org.apache.geode.test.junit.categories.SessionTest;
-
-@Category(SessionTest.class)
-@Deprecated
-public class Tomcat6SessionsTest extends AbstractSessionsTest {
-
- @BeforeClass
- public static void setupClass() throws Exception {
- setupServer(new Tomcat6DeltaSessionManager());
- }
-}
diff --git a/extensions/geode-modules/src/integrationTest/java/org/apache/geode/modules/session/catalina/JvmRouteBinderValveIntegrationTest.java b/extensions/geode-modules/src/integrationTest/java/org/apache/geode/modules/session/catalina/JvmRouteBinderValveIntegrationTest.java
index cf338673762e..37e85836ee67 100644
--- a/extensions/geode-modules/src/integrationTest/java/org/apache/geode/modules/session/catalina/JvmRouteBinderValveIntegrationTest.java
+++ b/extensions/geode-modules/src/integrationTest/java/org/apache/geode/modules/session/catalina/JvmRouteBinderValveIntegrationTest.java
@@ -17,6 +17,7 @@
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.doCallRealMethod;
+import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.spy;
@@ -51,6 +52,8 @@ public class JvmRouteBinderValveIntegrationTest extends AbstractSessionValveInte
@Before
public void setUp() {
request = spy(Request.class);
+ doNothing().when(request).changeSessionId(anyString());
+
response = spy(Response.class);
testValve = new TestValve(false);
@@ -157,8 +160,8 @@ public void invokeShouldCorrectlyHandleSessionFailover(RegionShortcut regionShor
parameterizedSetUp(regionShortcut);
when(deltaSessionManager.getJvmRoute()).thenReturn("jvmRoute");
when(deltaSessionManager.getContextName()).thenReturn(TEST_CONTEXT);
- when(deltaSessionManager.getContainer()).thenReturn(mock(Context.class));
- when(((Context) deltaSessionManager.getContainer()).getApplicationLifecycleListeners())
+ when(deltaSessionManager.getContext()).thenReturn(mock(Context.class));
+ when(deltaSessionManager.getContext().getApplicationLifecycleListeners())
.thenReturn(new Object[] {});
doCallRealMethod().when(deltaSessionManager).findSession(anyString());
diff --git a/extensions/geode-modules/src/integrationTest/java/org/apache/geode/modules/session/catalina/internal/AbstractDeltaSessionIntegrationTest.java b/extensions/geode-modules/src/integrationTest/java/org/apache/geode/modules/session/catalina/internal/AbstractDeltaSessionIntegrationTest.java
index 31668d0b42a7..bddc58c0082b 100644
--- a/extensions/geode-modules/src/integrationTest/java/org/apache/geode/modules/session/catalina/internal/AbstractDeltaSessionIntegrationTest.java
+++ b/extensions/geode-modules/src/integrationTest/java/org/apache/geode/modules/session/catalina/internal/AbstractDeltaSessionIntegrationTest.java
@@ -66,7 +66,7 @@ void mockDeltaSessionManager() {
when(deltaSessionManager.getLogger()).thenReturn(mock(Log.class));
when(deltaSessionManager.getRegionName()).thenReturn(REGION_NAME);
when(deltaSessionManager.isBackingCacheAvailable()).thenReturn(true);
- when(deltaSessionManager.getContainer()).thenReturn(mock(Context.class));
+ when(deltaSessionManager.getContext()).thenReturn(mock(Context.class));
when(deltaSessionManager.getSessionCache()).thenReturn(mock(SessionCache.class));
when(deltaSessionManager.getSessionCache().getOperatingRegion()).thenReturn(httpSessionRegion);
}
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 9fe63bc6be6e..d3c7c2b08e3a 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
@@ -34,7 +34,6 @@
import javax.servlet.http.HttpSession;
import org.apache.catalina.Manager;
-import org.apache.catalina.ha.session.SerializablePrincipal;
import org.apache.catalina.realm.GenericPrincipal;
import org.apache.catalina.security.SecurityUtil;
import org.apache.catalina.session.StandardSession;
@@ -138,9 +137,8 @@ public Principal getPrincipal() {
if (principal == null && serializedPrincipal != null) {
final Log logger = deltaSessionManager.getLogger();
- final SerializablePrincipal sp;
try {
- sp = (SerializablePrincipal) BlobHelper.deserializeBlob(serializedPrincipal);
+ principal = (GenericPrincipal) BlobHelper.deserializeBlob(serializedPrincipal);
} catch (Exception e) {
logger.warn(this
+ ": Serialized principal contains a byte[] that cannot be deserialized due to the following exception",
@@ -148,8 +146,6 @@ public Principal getPrincipal() {
return null;
}
- principal = sp.getPrincipal(deltaSessionManager.getTheContext().getRealm());
-
if (logger.isDebugEnabled()) {
logger.debug(this + ": Deserialized principal: " + principal);
}
@@ -177,12 +173,11 @@ private byte[] getSerializedPrincipal() {
if (serializedPrincipal == null) {
if (principal != null && principal instanceof GenericPrincipal) {
GenericPrincipal gp = (GenericPrincipal) principal;
- SerializablePrincipal sp = SerializablePrincipal.createPrincipal(gp);
- serializedPrincipal = serialize(sp);
+ serializedPrincipal = serialize(gp);
if (manager != null) {
final Log logger = getDeltaSessionManager().getLogger();
if (logger.isDebugEnabled()) {
- logger.debug(this + ": Serialized principal: " + sp);
+ logger.debug(this + ": Serialized principal: " + gp);
}
}
}
diff --git a/extensions/geode-modules/src/main/java/org/apache/geode/modules/session/catalina/DeltaSessionManager.java b/extensions/geode-modules/src/main/java/org/apache/geode/modules/session/catalina/DeltaSessionManager.java
index 99ef7d26c450..674d42e563f9 100644
--- a/extensions/geode-modules/src/main/java/org/apache/geode/modules/session/catalina/DeltaSessionManager.java
+++ b/extensions/geode-modules/src/main/java/org/apache/geode/modules/session/catalina/DeltaSessionManager.java
@@ -14,8 +14,10 @@
*/
package org.apache.geode.modules.session.catalina;
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
+import static java.lang.Math.max;
+import static java.lang.Math.min;
+import static java.util.concurrent.TimeUnit.MINUTES;
+
import java.io.IOException;
import java.util.Collections;
import java.util.HashSet;
@@ -27,8 +29,6 @@
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
-import org.apache.catalina.Container;
-import org.apache.catalina.Context;
import org.apache.catalina.Lifecycle;
import org.apache.catalina.Pipeline;
import org.apache.catalina.Session;
@@ -43,16 +43,12 @@
import org.apache.geode.internal.cache.GemFireCacheImpl;
import org.apache.geode.modules.session.catalina.internal.DeltaSessionStatistics;
import org.apache.geode.modules.util.ContextMapper;
-import org.apache.geode.modules.util.RegionConfiguration;
import org.apache.geode.modules.util.RegionHelper;
public abstract class DeltaSessionManager>
extends ManagerBase
- implements Lifecycle, PropertyChangeListener, SessionManager, DeltaSessionManagerConfiguration {
+ implements Lifecycle, SessionManager, DeltaSessionManagerConfiguration {
- static final String catalinaBaseSystemProperty = "catalina.base";
- static final String javaTempDirSystemProperty = "java.io.tmpdir";
- static final String fileSeparatorSystemProperty = "file.separator";
/**
* The number of rejected sessions.
*/
@@ -149,8 +145,9 @@ public void setRegionName(String regionName) {
}
@Override
- public void setMaxInactiveInterval(final int interval) {
- super.setMaxInactiveInterval(interval);
+ public int getMaxInactiveInterval() {
+ return (int) max(min(MINUTES.toSeconds(getContext().getSessionTimeout()), Integer.MAX_VALUE),
+ -1);
}
@Override
@@ -261,9 +258,10 @@ public boolean isBackingCacheAvailable() {
@Deprecated
@Override
public void setPreferDeserializedForm(boolean enable) {
- log.warn("Use of deprecated preferDeserializedForm property to be removed in future release.");
+ getLogger()
+ .warn("Use of deprecated preferDeserializedForm property to be removed in future release.");
if (!enable) {
- log.warn(
+ getLogger().warn(
"Use of HttpSessionAttributeListener may result in serialized form in HttpSessionBindingEvent.");
}
preferDeserializedForm = enable;
@@ -307,33 +305,6 @@ public boolean isClientServer() {
return getSessionCache().isClientServer();
}
- /**
- * This method was taken from StandardManager to set the default maxInactiveInterval based on the
- * container (to 30 minutes).
- *
- * Set the Container with which this Manager has been associated. If it is a Context (the usual
- * case), listen for changes to the session timeout property.
- *
- * @param container The associated Container
- */
- @Override
- public void setContainer(Container container) {
- // De-register from the old Container (if any)
- if ((this.container != null) && (this.container instanceof Context)) {
- this.container.removePropertyChangeListener(this);
- }
-
- // Default processing provided by our superclass
- super.setContainer(container);
-
- // Register with the new Container (if any)
- if ((this.container != null) && (this.container instanceof Context)) {
- // Overwrite the max inactive interval with the context's session timeout.
- setMaxInactiveInterval(((Context) this.container).getSessionTimeout() * 60);
- this.container.addPropertyChangeListener(this);
- }
- }
-
@Override
public Session findSession(String id) {
if (id == null) {
@@ -454,11 +425,6 @@ public int getRejectedSessions() {
return rejectedSessions.get();
}
- @Override
- public void setRejectedSessions(int rejectedSessions) {
- this.rejectedSessions.set(rejectedSessions);
- }
-
/**
* Returns the number of active sessions
*
@@ -589,7 +555,7 @@ protected void registerJvmRouteBinderValve() {
}
Pipeline getPipeline() {
- return getContainer().getPipeline();
+ return getContext().getPipeline();
}
protected void unregisterJvmRouteBinderValve() {
@@ -620,58 +586,6 @@ protected void unregisterCommitSessionValve() {
}
}
- // ------------------------------ Lifecycle Methods
-
- /**
- * Process property change events from our associated Context.
- *
- * Part of this method implementation was taken from StandardManager. The sessionTimeout can be
- * changed in the web.xml which is processed after the context.xml. The context (and the default
- * session timeout) would already have been set in this Manager. This is the way to get the new
- * session timeout value specified in the web.xml.
- *
- * The precedence order for setting the session timeout value is:
- *
- *
the max inactive interval is set based on the Manager defined in the context.xml
- *
the max inactive interval is then overwritten by the value of the Context's session timeout
- * when setContainer is called
- *
the max inactive interval is then overwritten by the value of the session-timeout specified
- * in the web.xml (if any)
- *
- *
- * @param event The property change event that has occurred
- */
- @Override
- public void propertyChange(PropertyChangeEvent event) {
-
- // Validate the source of this event
- if (!(event.getSource() instanceof Context)) {
- return;
- }
-
- // Process a relevant property change
- if (event.getPropertyName().equals("sessionTimeout")) {
- try {
- int interval = (Integer) event.getNewValue();
- if (interval < RegionConfiguration.DEFAULT_MAX_INACTIVE_INTERVAL) {
- getLogger().warn("The configured session timeout of " + interval
- + " minutes is invalid. Using the original value of " + event.getOldValue()
- + " minutes.");
- interval = (Integer) event.getOldValue();
- }
- // StandardContext.setSessionTimeout passes -1 if the configured timeout
- // is 0; otherwise it passes the value set in web.xml. If the interval
- // parameter equals the default, set the max inactive interval to the
- // default (no expiration); otherwise set it in seconds.
- setMaxInactiveInterval(interval == RegionConfiguration.DEFAULT_MAX_INACTIVE_INTERVAL
- ? RegionConfiguration.DEFAULT_MAX_INACTIVE_INTERVAL : interval * 60);
- } catch (NumberFormatException e) {
- getLogger()
- .error(sm.getString("standardManager.sessionTimeout", event.getNewValue().toString()));
- }
- }
- }
-
/**
* Clear the local cache to avoid ClassCastException if container is being reloaded.
*/
@@ -694,21 +608,12 @@ private void clearLocalCache() {
@Override
public String toString() {
return getClass().getSimpleName() + "[" + "container="
- + getTheContext() + "; regionName=" + regionName
+ + getContext() + "; regionName=" + regionName
+ "; regionAttributesId=" + regionAttributesId + "]";
}
String getContextName() {
- return getTheContext().getName();
+ return getContext().getName();
}
- public Context getTheContext() {
- if (getContainer() instanceof Context) {
- return (Context) getContainer();
- } else {
- getLogger().error("Unable to unload sessions - container is of type "
- + getContainer().getClass().getName() + " instead of StandardContext");
- return null;
- }
- }
}
diff --git a/extensions/geode-modules/src/main/java/org/apache/geode/modules/session/catalina/Tomcat6CommitSessionValve.java b/extensions/geode-modules/src/main/java/org/apache/geode/modules/session/catalina/Tomcat6CommitSessionValve.java
deleted file mode 100644
index adb0c88bc280..000000000000
--- a/extensions/geode-modules/src/main/java/org/apache/geode/modules/session/catalina/Tomcat6CommitSessionValve.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-
-package org.apache.geode.modules.session.catalina;
-
-import org.apache.catalina.connector.Response;
-
-@Deprecated
-public final class Tomcat6CommitSessionValve
- extends AbstractCommitSessionValve {
-
- @Override
- protected Response wrapResponse(Response response) {
- return response;
- }
-}
diff --git a/extensions/geode-modules/src/main/java/org/apache/geode/modules/session/catalina/Tomcat6DeltaSessionManager.java b/extensions/geode-modules/src/main/java/org/apache/geode/modules/session/catalina/Tomcat6DeltaSessionManager.java
deleted file mode 100644
index 8eef4316a23e..000000000000
--- a/extensions/geode-modules/src/main/java/org/apache/geode/modules/session/catalina/Tomcat6DeltaSessionManager.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.modules.session.catalina;
-
-import org.apache.catalina.LifecycleListener;
-import org.apache.catalina.util.LifecycleSupport;
-
-/**
- * @deprecated Tomcat 6 has reached its end of life and support for Tomcat 6 will be removed
- * from a future Geode release.
- */
-@Deprecated
-public class Tomcat6DeltaSessionManager extends DeltaSessionManager {
-
- /**
- * The LifecycleSupport for this component.
- */
- private final LifecycleSupport lifecycle = new LifecycleSupport(this);
-
- /**
- * Prepare for the beginning of active use of the public methods of this component. This method
- * should be called after configure(), and before any of the public methods of the
- * component are utilized.
- *
- */
- @Override
- public synchronized void start() {
- if (getLogger().isDebugEnabled()) {
- getLogger().debug(this + ": Starting");
- }
- if (started.get()) {
- return;
- }
- lifecycle.fireLifecycleEvent(START_EVENT, null);
- try {
- init();
- } catch (Throwable t) {
- getLogger().error(t.getMessage(), t);
- }
-
- // Register our various valves
- registerJvmRouteBinderValve();
-
- if (isCommitValveEnabled()) {
- registerCommitSessionValve();
- }
-
- // Initialize the appropriate session cache interface
- initializeSessionCache();
-
- // Create the timer and schedule tasks
- scheduleTimerTasks();
-
- started.set(true);
- }
-
- /**
- * Gracefully terminate the active use of the public methods of this component. This method should
- * be the last one called on a given instance of this component.
- *
- */
- @Override
- public synchronized void stop() {
- if (getLogger().isDebugEnabled()) {
- getLogger().debug(this + ": Stopping");
- }
- started.set(false);
- lifecycle.fireLifecycleEvent(STOP_EVENT, null);
-
- // StandardManager expires all Sessions here.
- // All Sessions are not known by this Manager.
-
- // Require a new random number generator if we are restarted
- random = null;
-
- // Remove from RMI registry
- if (initialized) {
- destroy();
- }
-
- // Clear any sessions to be touched
- getSessionsToTouch().clear();
-
- // Cancel the timer
- cancelTimer();
-
- // Unregister the JVM route valve
- unregisterJvmRouteBinderValve();
-
- if (isCommitValveEnabled()) {
- unregisterCommitSessionValve();
- }
- }
-
- /**
- * Add a lifecycle event listener to this component.
- *
- * @param listener The listener to add
- */
- @Override
- public void addLifecycleListener(LifecycleListener listener) {
- lifecycle.addLifecycleListener(listener);
- }
-
- /**
- * Get the lifecycle listeners associated with this lifecycle. If this Lifecycle has no listeners
- * registered, a zero-length array is returned.
- */
- @Override
- public LifecycleListener[] findLifecycleListeners() {
- return lifecycle.findLifecycleListeners();
- }
-
- /**
- * Remove a lifecycle event listener from this component.
- *
- * @param listener The listener to remove
- */
- @Override
- public void removeLifecycleListener(LifecycleListener listener) {
- lifecycle.removeLifecycleListener(listener);
- }
-
- @Override
- protected Tomcat6CommitSessionValve createCommitSessionValve() {
- return new Tomcat6CommitSessionValve();
- }
-}
diff --git a/extensions/geode-modules/src/test/resources/expected-pom.xml b/extensions/geode-modules/src/test/resources/expected-pom.xml
index 4cd26469146d..f30f863320d4 100644
--- a/extensions/geode-modules/src/test/resources/expected-pom.xml
+++ b/extensions/geode-modules/src/test/resources/expected-pom.xml
@@ -17,7 +17,7 @@
limitations under the License.
-->
4.0.0
- org.apache.geode
+ com.vmware.gemfiregeode-modules${version}Apache Geode
@@ -37,7 +37,7 @@
- org.apache.geode
+ com.vmware.gemfiregeode-all-bom${version}pom
@@ -47,27 +47,27 @@
- org.apache.geode
+ com.vmware.gemfiregeode-loggingcompile
- org.apache.geode
+ com.vmware.gemfiregeode-commoncompile
- org.apache.geode
+ com.vmware.gemfiregeode-corecompile
- org.apache.geode
+ com.vmware.gemfiregeode-membershipruntime
- org.apache.geode
+ com.vmware.gemfiregeode-serializationruntime
diff --git a/geode-assembly/build.gradle b/geode-assembly/build.gradle
index 8e62fabea912..6dfaba7eb4d7 100755
--- a/geode-assembly/build.gradle
+++ b/geode-assembly/build.gradle
@@ -53,8 +53,6 @@ configurations {
geodeLibdirJarsDeprecated
// Configurations used to download and cache web application servers for session module testing
- webServerTomcat6
- webServerTomcat7
webServerTomcat8
webServerTomcat9
webServerJetty
@@ -95,16 +93,6 @@ artifacts {
}
repositories {
- //This "repository" only exists to download tomcat-6, because the zip for tomcat 6 is
- //not in a maven repo. Later versions of tomcat are.
- ivy {
- url 'https://archive.apache.org/'
- patternLayout {
- artifact '/dist/tomcat/tomcat-6/v6.0.37/bin/[organisation]-[module]-[revision].[ext]'
- }
- // Infer the metadata from the presence of the artifact
- metadataSources { artifact() }
- }
// For gradle tooling dependencies
maven {
url 'https://repo.gradle.org/gradle/libs-releases'
@@ -158,7 +146,6 @@ dependencies {
javadocOnly(project(':geode-server-all'))
javadocOnly(project(':extensions:geode-modules'))
javadocOnly(project(':extensions:geode-modules-session'))
- javadocOnly(project(':extensions:geode-modules-tomcat7'))
javadocOnly(project(':extensions:geode-modules-tomcat9'))
javadocOnly(project(':extensions:geode-modules-tomcat8'))
@@ -279,8 +266,6 @@ dependencies {
upgradeTestRuntimeOnly files({ downloadWebServers } )
//Web servers used for session module testing
- webServerTomcat6('apache:tomcat:' + DependencyConstraints.get('tomcat6.version') + '@zip')
- webServerTomcat7('org.apache.tomcat:tomcat:' + DependencyConstraints.get('tomcat7.version') + '@zip')
webServerTomcat8('org.apache.tomcat:tomcat:' + DependencyConstraints.get('tomcat8.version') + '@zip')
webServerTomcat9('org.apache.tomcat:tomcat:' + DependencyConstraints.get('tomcat9.version') + '@zip')
webServerJetty('org.eclipse.jetty:jetty-distribution:' + DependencyConstraints.get('jetty.version') + '@zip')
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 bec094c415e5..e8f8fda365dc 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,8 +43,6 @@ public class TomcatInstall extends ContainerInstall {
* version, and other properties or XML attributes needed to setup tomcat containers within Cargo
*/
public enum TomcatVersion {
- TOMCAT6(6, "tomcat-6.0.37.zip"),
- TOMCAT7(7, "tomcat-7.0.109.zip"),
TOMCAT8(8, "tomcat-8.5.66.zip"),
TOMCAT9(9, "tomcat-9.0.62.zip");
@@ -80,10 +78,6 @@ public String getDownloadURL() {
public String jarSkipPropertyName() {
switch (this) {
- case TOMCAT6:
- return null;
- case TOMCAT7:
- return "tomcat.util.scan.DefaultJarScanner.jarsToSkip";
case TOMCAT8:
case TOMCAT9:
return "tomcat.util.scan.StandardJarScanFilter.jarsToSkip";
diff --git a/geode-assembly/src/acceptanceTest/java/org/apache/geode/jdk/JdkEncapsulationTest.java b/geode-assembly/src/acceptanceTest/java/org/apache/geode/jdk/JdkEncapsulationTest.java
index e500f5e625c9..143033a7f6cb 100644
--- a/geode-assembly/src/acceptanceTest/java/org/apache/geode/jdk/JdkEncapsulationTest.java
+++ b/geode-assembly/src/acceptanceTest/java/org/apache/geode/jdk/JdkEncapsulationTest.java
@@ -1,3 +1,4 @@
+// Copyright (c) VMware, Inc. 2022. All rights reserved.
/*
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional information regarding
@@ -17,6 +18,7 @@
package org.apache.geode.jdk;
import static org.apache.geode.internal.AvailablePortHelper.getRandomAvailableTCPPort;
+import static org.apache.geode.jdk.ReflectEncapsulatedJdkObject.OBJECT;
import static org.apache.geode.test.util.JarUtils.createJarWithClasses;
import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
import static org.assertj.core.api.Assumptions.assumeThat;
@@ -36,7 +38,7 @@
import org.apache.geode.test.version.JavaVersions;
/**
- * Test several ways to make normally inaccessible JDK packages accessible on JDK 17.
+ * Test several ways to make encapsulated types in JDK packages accessible for reflection on JDK 17.
*/
public class JdkEncapsulationTest {
@Rule(order = 0)
@@ -46,26 +48,26 @@ public class JdkEncapsulationTest {
public final GfshRule gfshRule = new GfshRule(folderRule::getFolder);
private String startServer;
- private GfshScript traverseEncapsulatedJdkObject;
+ private GfshScript reflectEncapsulatedJdkObject;
@BeforeClass
- public static void validOnlyOnJdk17AndLater() {
+ public static void enableTheseTestsOnlyOnJdk17AndLater() {
assumeThat(JavaVersions.current().specificationVersion())
.isGreaterThanOrEqualTo(17);
}
@Before
- public void startLocatorWithObjectTraverserFunction() throws IOException {
- Path jarPath = folderRule.getFolder().toPath().resolve("traverse-encapsulated-jdk-object.jar");
- createJarWithClasses(jarPath, TraverseEncapsulatedJdkObject.class);
+ public void startLocatorAndDeployReflectionFunction() throws IOException {
+ Path jarPath = folderRule.getFolder().toPath().resolve("reflect-encapsulated-jdk-object.jar");
+ createJarWithClasses(jarPath, ReflectEncapsulatedJdkObject.class);
int locatorPort = getRandomAvailableTCPPort();
String locators = "localhost[" + locatorPort + "]";
startServer = "start server --name=server --disable-default-server --locators=" + locators;
- traverseEncapsulatedJdkObject = GfshScript
+ reflectEncapsulatedJdkObject = GfshScript
.of("connect --locator=" + locators)
- .and("execute function --id=" + TraverseEncapsulatedJdkObject.ID);
+ .and("execute function --id=" + ReflectEncapsulatedJdkObject.ID);
GfshScript
.of("start locator --port=" + locatorPort)
@@ -73,34 +75,36 @@ public void startLocatorWithObjectTraverserFunction() throws IOException {
.execute(gfshRule);
}
- // If this test fails, it means the object we're trying to traverse has no inaccessible fields,
- // and so is not useful for the other tests. If it fails, update TraverseInaccessibleJdkObject
- // to use a type that actually has inaccessible fields.
+ /**
+ * If this test fails, it means the object we're trying to reflect has no inaccessible fields,
+ * and so is not useful for the other tests. If it fails, update
+ * {@link ReflectEncapsulatedJdkObject} to use a type that has inaccessible fields.
+ */
@Test
public void cannotMakeEncapsulatedFieldsAccessibleByDefault() {
gfshRule.execute(startServer); // No JDK options
- String traversalResult = traverseEncapsulatedJdkObject
+ String reflectionResult = reflectEncapsulatedJdkObject
.expectExitCode(1) // Because we did not open any JDK packages.
.execute(gfshRule)
.getOutputText();
- assertThat(traversalResult)
- .as("result of traversing %s", TraverseEncapsulatedJdkObject.OBJECT.getClass())
+ assertThat(reflectionResult)
+ .as("result of reflecting %s", OBJECT.getClass())
.contains("Exception: java.lang.reflect.InaccessibleObjectException");
}
@Test
public void canMakeEncapsulatedFieldsAccessibleInExplicitlyOpenedPackages() {
- String objectPackage = TraverseEncapsulatedJdkObject.OBJECT.getClass().getPackage().getName();
- String objectModule = TraverseEncapsulatedJdkObject.MODULE;
+ String objectPackage = OBJECT.getClass().getPackage().getName();
+ String objectModule = ReflectEncapsulatedJdkObject.MODULE;
String openThePackageOfTheEncapsulatedJdkObject =
String.format(" --J=--add-opens=%s/%s=ALL-UNNAMED", objectModule, objectPackage);
gfshRule.execute(startServer + openThePackageOfTheEncapsulatedJdkObject);
- traverseEncapsulatedJdkObject
+ reflectEncapsulatedJdkObject
.expectExitCode(0) // Because we opened the encapsulated object's package.
.execute(gfshRule);
}
@@ -117,7 +121,7 @@ public void canMakeEncapsulatedFieldsAccessibleInPackagesOpenedByArgumentFile()
gfshRule.execute(startServer + useArgumentFile);
- traverseEncapsulatedJdkObject
+ reflectEncapsulatedJdkObject
.expectExitCode(0) // Because the argument file opens all JDK packages.
.execute(gfshRule);
}
diff --git a/geode-assembly/src/acceptanceTest/java/org/apache/geode/jdk/TraverseEncapsulatedJdkObject.java b/geode-assembly/src/acceptanceTest/java/org/apache/geode/jdk/ReflectEncapsulatedJdkObject.java
similarity index 70%
rename from geode-assembly/src/acceptanceTest/java/org/apache/geode/jdk/TraverseEncapsulatedJdkObject.java
rename to geode-assembly/src/acceptanceTest/java/org/apache/geode/jdk/ReflectEncapsulatedJdkObject.java
index a2239d3116e8..3f3f4c800bf4 100644
--- a/geode-assembly/src/acceptanceTest/java/org/apache/geode/jdk/TraverseEncapsulatedJdkObject.java
+++ b/geode-assembly/src/acceptanceTest/java/org/apache/geode/jdk/ReflectEncapsulatedJdkObject.java
@@ -1,3 +1,4 @@
+// Copyright (c) VMware, Inc. 2022. All rights reserved.
/*
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional information regarding
@@ -16,23 +17,19 @@
package org.apache.geode.jdk;
+import java.lang.reflect.Field;
import java.math.BigDecimal;
import org.apache.geode.cache.execute.Function;
import org.apache.geode.cache.execute.FunctionContext;
-import org.apache.geode.internal.size.ObjectTraverser;
-import org.apache.geode.internal.size.ObjectTraverser.Visitor;
-
-public class TraverseEncapsulatedJdkObject implements Function {
- private static final Visitor TRAVERSE_ENTIRE_OBJECT_GRAPH = (parent, object) -> true;
- private final ObjectTraverser traverser = new ObjectTraverser();
+public class ReflectEncapsulatedJdkObject implements Function {
// OBJECT must have a JDK type with inaccessible fields, defined in a package that Gfsh does
// not open by default.
static final BigDecimal OBJECT = BigDecimal.ONE;
// MODULE must be the module that defines OBJECT's type.
static final String MODULE = "java.base";
- static final String ID = "traverse-big-decimal";
+ static final String ID = "reflect-encapsulated-jdk-object";
@Override
public String getId() {
@@ -41,11 +38,10 @@ public String getId() {
@Override
public void execute(FunctionContext context) {
- try {
- traverser.breadthFirstSearch(OBJECT, TRAVERSE_ENTIRE_OBJECT_GRAPH, false);
- } catch (IllegalAccessException e) {
- context.getResultSender().sendException(e);
- return;
+ for (Field f : OBJECT.getClass().getDeclaredFields()) {
+ // Throws InaccessibleObjectException on JDK 17 if the field is inaccessible and the declaring
+ // class's package is not open to Geode.
+ f.setAccessible(true);
}
context.getResultSender().lastResult("OK");
}
diff --git a/geode-assembly/src/distributedTest/java/org/apache/geode/session/tests/Tomcat6CachingClientServerTest.java b/geode-assembly/src/distributedTest/java/org/apache/geode/session/tests/Tomcat6CachingClientServerTest.java
deleted file mode 100644
index 1c6f9d09c60c..000000000000
--- a/geode-assembly/src/distributedTest/java/org/apache/geode/session/tests/Tomcat6CachingClientServerTest.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.session.tests;
-
-import static org.apache.geode.session.tests.ContainerInstall.ConnectionType.CACHING_CLIENT_SERVER;
-import static org.apache.geode.session.tests.TomcatInstall.TomcatVersion.TOMCAT6;
-
-import java.util.function.IntSupplier;
-
-public class Tomcat6CachingClientServerTest extends TomcatClientServerTest {
- @Override
- public ContainerInstall getInstall(IntSupplier portSupplier) throws Exception {
- return new TomcatInstall(getClass().getSimpleName(), TOMCAT6, CACHING_CLIENT_SERVER,
- portSupplier, TomcatInstall.CommitValve.DEFAULT);
- }
-}
diff --git a/geode-assembly/src/distributedTest/java/org/apache/geode/session/tests/Tomcat6ClientServerTest.java b/geode-assembly/src/distributedTest/java/org/apache/geode/session/tests/Tomcat6ClientServerTest.java
deleted file mode 100644
index 75d853d26536..000000000000
--- a/geode-assembly/src/distributedTest/java/org/apache/geode/session/tests/Tomcat6ClientServerTest.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.session.tests;
-
-import static org.apache.geode.session.tests.ContainerInstall.ConnectionType.CLIENT_SERVER;
-import static org.apache.geode.session.tests.TomcatInstall.TomcatVersion.TOMCAT6;
-
-import java.util.function.IntSupplier;
-
-public class Tomcat6ClientServerTest extends TomcatClientServerTest {
- @Override
- public ContainerInstall getInstall(IntSupplier portSupplier) throws Exception {
- return new TomcatInstall(getClass().getSimpleName(), TOMCAT6, CLIENT_SERVER, portSupplier,
- TomcatInstall.CommitValve.DEFAULT);
- }
-}
diff --git a/geode-assembly/src/distributedTest/java/org/apache/geode/session/tests/Tomcat6Test.java b/geode-assembly/src/distributedTest/java/org/apache/geode/session/tests/Tomcat6Test.java
deleted file mode 100644
index 50487d0dfaed..000000000000
--- a/geode-assembly/src/distributedTest/java/org/apache/geode/session/tests/Tomcat6Test.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.session.tests;
-
-import static org.apache.geode.session.tests.ContainerInstall.ConnectionType.PEER_TO_PEER;
-import static org.apache.geode.session.tests.TomcatInstall.TomcatVersion.TOMCAT6;
-
-import java.util.function.IntSupplier;
-
-public class Tomcat6Test extends CargoTestBase {
- @Override
- public ContainerInstall getInstall(IntSupplier portSupplier) throws Exception {
- return new TomcatInstall(getClass().getSimpleName(), TOMCAT6, PEER_TO_PEER, portSupplier,
- TomcatInstall.CommitValve.DEFAULT);
- }
-}
diff --git a/geode-assembly/src/distributedTest/java/org/apache/geode/session/tests/Tomcat7CachingClientServerTest.java b/geode-assembly/src/distributedTest/java/org/apache/geode/session/tests/Tomcat7CachingClientServerTest.java
deleted file mode 100644
index 4401bfe616d4..000000000000
--- a/geode-assembly/src/distributedTest/java/org/apache/geode/session/tests/Tomcat7CachingClientServerTest.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.session.tests;
-
-import static org.apache.geode.session.tests.ContainerInstall.ConnectionType.CACHING_CLIENT_SERVER;
-import static org.apache.geode.session.tests.TomcatInstall.TomcatVersion.TOMCAT7;
-
-import java.util.function.IntSupplier;
-
-public class Tomcat7CachingClientServerTest extends TomcatClientServerTest {
- @Override
- public ContainerInstall getInstall(IntSupplier portSupplier) throws Exception {
- return new TomcatInstall(getClass().getSimpleName(), TOMCAT7, CACHING_CLIENT_SERVER,
- portSupplier, TomcatInstall.CommitValve.DEFAULT);
- }
-}
diff --git a/geode-assembly/src/distributedTest/java/org/apache/geode/session/tests/Tomcat7ClientServerTest.java b/geode-assembly/src/distributedTest/java/org/apache/geode/session/tests/Tomcat7ClientServerTest.java
deleted file mode 100644
index f2cacf5da62c..000000000000
--- a/geode-assembly/src/distributedTest/java/org/apache/geode/session/tests/Tomcat7ClientServerTest.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.session.tests;
-
-
-import static org.apache.geode.session.tests.ContainerInstall.ConnectionType.CLIENT_SERVER;
-import static org.apache.geode.session.tests.TomcatInstall.TomcatVersion.TOMCAT7;
-
-import java.util.function.IntSupplier;
-
-public class Tomcat7ClientServerTest extends TomcatClientServerTest {
- @Override
- public ContainerInstall getInstall(IntSupplier portSupplier) throws Exception {
- return new TomcatInstall(getClass().getSimpleName(), TOMCAT7, CLIENT_SERVER, portSupplier,
- TomcatInstall.CommitValve.DEFAULT);
- }
-}
diff --git a/geode-assembly/src/distributedTest/java/org/apache/geode/session/tests/Tomcat7Test.java b/geode-assembly/src/distributedTest/java/org/apache/geode/session/tests/Tomcat7Test.java
deleted file mode 100644
index 5e93e1f453af..000000000000
--- a/geode-assembly/src/distributedTest/java/org/apache/geode/session/tests/Tomcat7Test.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.session.tests;
-
-import static org.apache.geode.session.tests.ContainerInstall.ConnectionType.PEER_TO_PEER;
-import static org.apache.geode.session.tests.TomcatInstall.TomcatVersion.TOMCAT7;
-
-import java.util.function.IntSupplier;
-
-public class Tomcat7Test extends CargoTestBase {
- @Override
- public ContainerInstall getInstall(IntSupplier portSupplier) throws Exception {
- return new TomcatInstall(getClass().getSimpleName(), TOMCAT7, PEER_TO_PEER, portSupplier,
- TomcatInstall.CommitValve.DEFAULT);
- }
-}
diff --git a/geode-assembly/src/integrationTest/java/org/apache/geode/rest/internal/web/DevRestSwaggerVerificationIntegrationTest.java b/geode-assembly/src/integrationTest/java/org/apache/geode/rest/internal/web/DevRestSwaggerVerificationIntegrationTest.java
index e543020fad80..2a2f25982df0 100644
--- a/geode-assembly/src/integrationTest/java/org/apache/geode/rest/internal/web/DevRestSwaggerVerificationIntegrationTest.java
+++ b/geode-assembly/src/integrationTest/java/org/apache/geode/rest/internal/web/DevRestSwaggerVerificationIntegrationTest.java
@@ -20,6 +20,9 @@
import static org.hamcrest.MatcherAssert.assertThat;
import com.fasterxml.jackson.databind.JsonNode;
+import org.apache.http.Header;
+import org.apache.http.HttpResponse;
+import org.assertj.core.api.Assertions;
import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.Test;
@@ -47,8 +50,11 @@ public class DevRestSwaggerVerificationIntegrationTest {
@Test
public void isSwaggerRunning() throws Exception {
- // Check the UI
- assertResponse(client.get("/geode/swagger-ui.html")).hasStatusCode(200);
+ // Check the UI connects and hides server info
+ HttpResponse response = client.get("/geode/swagger-ui.html");
+ Header server = response.getFirstHeader("server");
+ Assertions.assertThat(server).isNull();
+ assertResponse(response).hasStatusCode(200);
// Check the JSON
JsonNode json =
diff --git a/geode-assembly/src/integrationTest/java/org/apache/geode/tools/pulse/PulseSecurityConfigDefaultProfileTest.java b/geode-assembly/src/integrationTest/java/org/apache/geode/tools/pulse/PulseSecurityConfigDefaultProfileTest.java
index d121363aa5ac..5a36697f3d02 100644
--- a/geode-assembly/src/integrationTest/java/org/apache/geode/tools/pulse/PulseSecurityConfigDefaultProfileTest.java
+++ b/geode-assembly/src/integrationTest/java/org/apache/geode/tools/pulse/PulseSecurityConfigDefaultProfileTest.java
@@ -16,7 +16,9 @@
package org.apache.geode.tools.pulse;
import static org.apache.geode.test.junit.rules.HttpResponseAssert.assertResponse;
+import static org.assertj.core.api.Assertions.assertThat;
+import org.apache.http.Header;
import org.apache.http.HttpResponse;
import org.junit.ClassRule;
import org.junit.Rule;
@@ -45,8 +47,10 @@ public void testLogin() throws Exception {
}
@Test
- public void loginPage() throws Exception {
+ public void loginPageRevealsNoServerInfoAndResponds() throws Exception {
HttpResponse response = client.get("/pulse/login.html");
+ Header server = response.getFirstHeader("server");
+ assertThat(server).isNull();
assertResponse(response).hasStatusCode(200).hasResponseBody().contains("");
}
diff --git a/geode-assembly/src/integrationTest/resources/assembly_content.txt b/geode-assembly/src/integrationTest/resources/assembly_content.txt
index f19575b92114..cc581ff58bbe 100644
--- a/geode-assembly/src/integrationTest/resources/assembly_content.txt
+++ b/geode-assembly/src/integrationTest/resources/assembly_content.txt
@@ -825,7 +825,6 @@ javadoc/org/apache/geode/modules/session/catalina/AbstractSessionCache.html
javadoc/org/apache/geode/modules/session/catalina/ClientServerCacheLifecycleListener.html
javadoc/org/apache/geode/modules/session/catalina/ClientServerSessionCache.html
javadoc/org/apache/geode/modules/session/catalina/DeltaSession.html
-javadoc/org/apache/geode/modules/session/catalina/DeltaSession7.html
javadoc/org/apache/geode/modules/session/catalina/DeltaSession8.html
javadoc/org/apache/geode/modules/session/catalina/DeltaSession9.html
javadoc/org/apache/geode/modules/session/catalina/DeltaSessionFacade.html
@@ -836,10 +835,6 @@ javadoc/org/apache/geode/modules/session/catalina/PeerToPeerCacheLifecycleListen
javadoc/org/apache/geode/modules/session/catalina/PeerToPeerSessionCache.html
javadoc/org/apache/geode/modules/session/catalina/SessionCache.html
javadoc/org/apache/geode/modules/session/catalina/SessionManager.html
-javadoc/org/apache/geode/modules/session/catalina/Tomcat6CommitSessionValve.html
-javadoc/org/apache/geode/modules/session/catalina/Tomcat6DeltaSessionManager.html
-javadoc/org/apache/geode/modules/session/catalina/Tomcat7CommitSessionValve.html
-javadoc/org/apache/geode/modules/session/catalina/Tomcat7DeltaSessionManager.html
javadoc/org/apache/geode/modules/session/catalina/Tomcat8CommitSessionValve.html
javadoc/org/apache/geode/modules/session/catalina/Tomcat8DeltaSessionManager.html
javadoc/org/apache/geode/modules/session/catalina/Tomcat9CommitSessionValve.html
@@ -1044,16 +1039,16 @@ lib/mx4j-remote-3.0.2.jar
lib/mx4j-tools-3.0.1.jar
lib/ra.jar
lib/rmiio-2.1.2.jar
-lib/shiro-cache-1.9.0.jar
-lib/shiro-config-core-1.9.0.jar
-lib/shiro-config-ogdl-1.9.0.jar
-lib/shiro-core-1.9.0.jar
-lib/shiro-crypto-cipher-1.9.0.jar
-lib/shiro-crypto-core-1.9.0.jar
-lib/shiro-crypto-hash-1.9.0.jar
-lib/shiro-event-1.9.0.jar
-lib/shiro-lang-1.9.0.jar
-lib/slf4j-api-1.7.32.jar
+lib/shiro-cache-1.9.1.jar
+lib/shiro-config-core-1.9.1.jar
+lib/shiro-config-ogdl-1.9.1.jar
+lib/shiro-core-1.9.1.jar
+lib/shiro-crypto-cipher-1.9.1.jar
+lib/shiro-crypto-core-1.9.1.jar
+lib/shiro-crypto-hash-1.9.1.jar
+lib/shiro-event-1.9.1.jar
+lib/shiro-lang-1.9.1.jar
+lib/slf4j-api-1.7.36.jar
lib/snappy-0.4.jar
lib/spring-beans-5.3.21.jar
lib/spring-context-5.3.21.jar
diff --git a/geode-assembly/src/integrationTest/resources/gfsh_dependency_classpath.txt b/geode-assembly/src/integrationTest/resources/gfsh_dependency_classpath.txt
index 62619491b2f8..2d0f655ef741 100644
--- a/geode-assembly/src/integrationTest/resources/gfsh_dependency_classpath.txt
+++ b/geode-assembly/src/integrationTest/resources/gfsh_dependency_classpath.txt
@@ -45,8 +45,8 @@ antlr-2.7.7.jar
istack-commons-runtime-4.0.1.jar
jaxb-impl-2.3.2.jar
commons-validator-1.7.jar
-shiro-core-1.9.0.jar
-shiro-config-ogdl-1.9.0.jar
+shiro-core-1.9.1.jar
+shiro-config-ogdl-1.9.1.jar
commons-beanutils-1.9.4.jar
commons-codec-1.15.jar
commons-collections-3.2.2.jar
@@ -66,14 +66,14 @@ jna-platform-5.11.0.jar
jna-5.11.0.jar
snappy-0.4.jar
jgroups-3.6.14.Final.jar
-shiro-cache-1.9.0.jar
-shiro-crypto-hash-1.9.0.jar
-shiro-crypto-cipher-1.9.0.jar
-shiro-config-core-1.9.0.jar
-shiro-event-1.9.0.jar
-shiro-crypto-core-1.9.0.jar
-shiro-lang-1.9.0.jar
-slf4j-api-1.7.32.jar
+shiro-cache-1.9.1.jar
+shiro-crypto-hash-1.9.1.jar
+shiro-crypto-cipher-1.9.1.jar
+shiro-config-core-1.9.1.jar
+shiro-event-1.9.1.jar
+shiro-crypto-core-1.9.1.jar
+shiro-lang-1.9.1.jar
+slf4j-api-1.7.36.jar
spring-beans-5.3.21.jar
javax.activation-api-1.2.0.jar
jline-2.12.jar
diff --git a/geode-assembly/src/main/dist/LICENSE b/geode-assembly/src/main/dist/LICENSE
index 6744983b6c82..72d998b4fddb 100644
--- a/geode-assembly/src/main/dist/LICENSE
+++ b/geode-assembly/src/main/dist/LICENSE
@@ -1097,7 +1097,7 @@ Apache Geode bundles the following files under the MIT License:
- Normalize.css v2.1.0 (https://necolas.github.io/normalize.css/),
Copyright (c) Nicolas Gallagher and Jonathan Neal
- Sizzle.js (http://sizzlejs.com/), Copyright (c) 2011, The Dojo Foundation
- - SLF4J API v1.7.32 (http://www.slf4j.org), Copyright (c) 2004-2017 QOS.ch
+ - SLF4J API v1.7.36 (http://www.slf4j.org), Copyright (c) 2004-2022 QOS.ch
- Split.js (https://github.com/nathancahill/Split.js), Copyright (c)
2015 Nathan Cahill
- TableDnD v0.5 (https://github.com/isocra/TableDnD), Copyright (c) 2012
diff --git a/geode-assembly/src/test/resources/expected-pom.xml b/geode-assembly/src/test/resources/expected-pom.xml
index ea904d5aab1b..016454c4a749 100644
--- a/geode-assembly/src/test/resources/expected-pom.xml
+++ b/geode-assembly/src/test/resources/expected-pom.xml
@@ -17,7 +17,7 @@
limitations under the License.
-->
4.0.0
- org.apache.geode
+ com.vmware.gemfireapache-geode${version}tgz
diff --git a/geode-assembly/src/upgradeTest/java/org/apache/geode/session/tests/TomcatSessionBackwardsCompatibilityTestBase.java b/geode-assembly/src/upgradeTest/java/org/apache/geode/session/tests/TomcatSessionBackwardsCompatibilityTestBase.java
index 4f9646c82506..3d6b7bf6bdf1 100644
--- a/geode-assembly/src/upgradeTest/java/org/apache/geode/session/tests/TomcatSessionBackwardsCompatibilityTestBase.java
+++ b/geode-assembly/src/upgradeTest/java/org/apache/geode/session/tests/TomcatSessionBackwardsCompatibilityTestBase.java
@@ -87,20 +87,17 @@ public static Collection data() {
protected File oldBuild;
protected File oldModules;
- protected TomcatInstall tomcat7079AndOldModules;
- protected TomcatInstall tomcat7079AndCurrentModules;
protected TomcatInstall tomcat8AndOldModules;
protected TomcatInstall tomcat8AndCurrentModules;
protected int locatorPort;
- protected String classPathTomcat7079;
protected String classPathTomcat8;
protected String serverDir;
protected String locatorDir;
protected TomcatSessionBackwardsCompatibilityTestBase(String version) {
VersionManager versionManager = VersionManager.getInstance();
- String installLocation = installLocation = versionManager.getInstall(version);
+ String installLocation = versionManager.getInstall(version);
oldBuild = new File(installLocation);
oldModules = new File(installLocation + "/tools/Modules/");
}
@@ -140,17 +137,6 @@ protected void startLocator(String name, String classPath, int port) throws IOEx
@Before
public void setup() throws Exception {
- tomcat7079AndOldModules =
- new TomcatInstall("Tomcat7079AndOldModules", TomcatInstall.TomcatVersion.TOMCAT7,
- ContainerInstall.ConnectionType.CLIENT_SERVER,
- oldModules.getAbsolutePath(), oldBuild.getAbsolutePath() + "/lib",
- portSupplier::getAvailablePort, TomcatInstall.CommitValve.DEFAULT);
-
- tomcat7079AndCurrentModules =
- new TomcatInstall("Tomcat7079AndCurrentModules", TomcatInstall.TomcatVersion.TOMCAT7,
- ContainerInstall.ConnectionType.CLIENT_SERVER,
- portSupplier::getAvailablePort, TomcatInstall.CommitValve.DEFAULT);
-
tomcat8AndOldModules =
new TomcatInstall("Tomcat8AndOldModules", TomcatInstall.TomcatVersion.TOMCAT8,
ContainerInstall.ConnectionType.CLIENT_SERVER,
@@ -163,17 +149,12 @@ public void setup() throws Exception {
ContainerInstall.ConnectionType.CLIENT_SERVER,
portSupplier::getAvailablePort, TomcatInstall.CommitValve.DEFAULT);
- classPathTomcat7079 = tomcat7079AndCurrentModules.getHome() + "/lib/*" + File.pathSeparator
- + tomcat7079AndCurrentModules.getHome() + "/bin/*";
classPathTomcat8 = tomcat8AndCurrentModules.getHome() + "/lib/*" + File.pathSeparator
+ tomcat8AndCurrentModules.getHome() + "/bin/*";
// Get available port for the locator
locatorPort = portSupplier.getAvailablePort();
- tomcat7079AndOldModules.setDefaultLocatorPort(locatorPort);
- tomcat7079AndCurrentModules.setDefaultLocatorPort(locatorPort);
-
tomcat8AndOldModules.setDefaultLocatorPort(locatorPort);
tomcat8AndCurrentModules.setDefaultLocatorPort(locatorPort);
diff --git a/geode-assembly/src/upgradeTest/java/org/apache/geode/session/tests/TomcatSessionBackwardsCompatibilityTomcat7079WithOldModuleCanDoPutsTest.java b/geode-assembly/src/upgradeTest/java/org/apache/geode/session/tests/TomcatSessionBackwardsCompatibilityTomcat7079WithOldModuleCanDoPutsTest.java
deleted file mode 100644
index 87f42951e238..000000000000
--- a/geode-assembly/src/upgradeTest/java/org/apache/geode/session/tests/TomcatSessionBackwardsCompatibilityTomcat7079WithOldModuleCanDoPutsTest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.session.tests;
-
-import org.junit.Test;
-import org.junit.runners.Parameterized;
-
-import org.apache.geode.test.junit.runners.CategoryWithParameterizedRunnerFactory;
-
-@Parameterized.UseParametersRunnerFactory(CategoryWithParameterizedRunnerFactory.class)
-public class TomcatSessionBackwardsCompatibilityTomcat7079WithOldModuleCanDoPutsTest
- extends TomcatSessionBackwardsCompatibilityTestBase {
-
- public TomcatSessionBackwardsCompatibilityTomcat7079WithOldModuleCanDoPutsTest(String version) {
- super(version);
- }
-
- @Test
- public void test() throws Exception {
- startClusterWithTomcat(classPathTomcat7079);
- manager.addContainer(tomcat7079AndOldModules);
- manager.addContainer(tomcat7079AndOldModules);
- doPutAndGetSessionOnAllClients();
- }
-
-}
diff --git a/geode-assembly/src/upgradeTest/java/org/apache/geode/session/tests/TomcatSessionBackwardsCompatibilityTomcat7079WithOldModulesMixedWithCurrentCanDoPutFromCurrentModuleTest.java b/geode-assembly/src/upgradeTest/java/org/apache/geode/session/tests/TomcatSessionBackwardsCompatibilityTomcat7079WithOldModulesMixedWithCurrentCanDoPutFromCurrentModuleTest.java
deleted file mode 100644
index 411ab456df2e..000000000000
--- a/geode-assembly/src/upgradeTest/java/org/apache/geode/session/tests/TomcatSessionBackwardsCompatibilityTomcat7079WithOldModulesMixedWithCurrentCanDoPutFromCurrentModuleTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.session.tests;
-
-import org.junit.Test;
-import org.junit.runners.Parameterized;
-
-import org.apache.geode.test.junit.runners.CategoryWithParameterizedRunnerFactory;
-
-@Parameterized.UseParametersRunnerFactory(CategoryWithParameterizedRunnerFactory.class)
-public class TomcatSessionBackwardsCompatibilityTomcat7079WithOldModulesMixedWithCurrentCanDoPutFromCurrentModuleTest
- extends TomcatSessionBackwardsCompatibilityTestBase {
-
- public TomcatSessionBackwardsCompatibilityTomcat7079WithOldModulesMixedWithCurrentCanDoPutFromCurrentModuleTest(
- String version) {
- super(version);
- }
-
- @Test
- public void test() throws Exception {
- startClusterWithTomcat(classPathTomcat7079);
- manager.addContainer(tomcat7079AndCurrentModules);
- manager.addContainer(tomcat7079AndOldModules);
- doPutAndGetSessionOnAllClients();
- }
-
-}
diff --git a/geode-assembly/src/upgradeTest/java/org/apache/geode/session/tests/TomcatSessionBackwardsCompatibilityTomcat7079WithOldModulesMixedWithCurrentCanDoPutFromOldModuleTest.java b/geode-assembly/src/upgradeTest/java/org/apache/geode/session/tests/TomcatSessionBackwardsCompatibilityTomcat7079WithOldModulesMixedWithCurrentCanDoPutFromOldModuleTest.java
deleted file mode 100644
index 09f49375b9eb..000000000000
--- a/geode-assembly/src/upgradeTest/java/org/apache/geode/session/tests/TomcatSessionBackwardsCompatibilityTomcat7079WithOldModulesMixedWithCurrentCanDoPutFromOldModuleTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.session.tests;
-
-import org.junit.Test;
-import org.junit.runners.Parameterized;
-
-import org.apache.geode.test.junit.runners.CategoryWithParameterizedRunnerFactory;
-
-@Parameterized.UseParametersRunnerFactory(CategoryWithParameterizedRunnerFactory.class)
-public class TomcatSessionBackwardsCompatibilityTomcat7079WithOldModulesMixedWithCurrentCanDoPutFromOldModuleTest
- extends TomcatSessionBackwardsCompatibilityTestBase {
-
- public TomcatSessionBackwardsCompatibilityTomcat7079WithOldModulesMixedWithCurrentCanDoPutFromOldModuleTest(
- String version) {
- super(version);
- }
-
- @Test
- public void test() throws Exception {
- startClusterWithTomcat(classPathTomcat7079);
- manager.addContainer(tomcat7079AndOldModules);
- manager.addContainer(tomcat7079AndCurrentModules);
- doPutAndGetSessionOnAllClients();
- }
-
-}
diff --git a/geode-common/src/test/resources/expected-pom.xml b/geode-common/src/test/resources/expected-pom.xml
index 1c512ff34f95..db951b648b9b 100644
--- a/geode-common/src/test/resources/expected-pom.xml
+++ b/geode-common/src/test/resources/expected-pom.xml
@@ -17,7 +17,7 @@
limitations under the License.
-->
4.0.0
- org.apache.geode
+ com.vmware.gemfiregeode-common${version}Apache Geode
@@ -37,7 +37,7 @@
- org.apache.geode
+ com.vmware.gemfiregeode-all-bom${version}pom
diff --git a/geode-concurrency-test/src/test/resources/expected-pom.xml b/geode-concurrency-test/src/test/resources/expected-pom.xml
index ac266b4fe9c2..e90721dfa262 100644
--- a/geode-concurrency-test/src/test/resources/expected-pom.xml
+++ b/geode-concurrency-test/src/test/resources/expected-pom.xml
@@ -17,7 +17,7 @@
limitations under the License.
-->
4.0.0
- org.apache.geode
+ com.vmware.gemfiregeode-concurrency-test${version}Apache Geode
@@ -37,7 +37,7 @@
- org.apache.geode
+ com.vmware.gemfiregeode-all-bom${version}pom
diff --git a/geode-connectors/src/test/resources/expected-pom.xml b/geode-connectors/src/test/resources/expected-pom.xml
index b76b329617bc..69aa6e072c24 100644
--- a/geode-connectors/src/test/resources/expected-pom.xml
+++ b/geode-connectors/src/test/resources/expected-pom.xml
@@ -17,7 +17,7 @@
limitations under the License.
-->
4.0.0
- org.apache.geode
+ com.vmware.gemfiregeode-connectors${version}Apache Geode
@@ -37,7 +37,7 @@
- org.apache.geode
+ com.vmware.gemfiregeode-all-bom${version}pom
@@ -47,22 +47,22 @@
- org.apache.geode
+ com.vmware.gemfiregeode-loggingruntime
- org.apache.geode
+ com.vmware.gemfiregeode-serializationruntime
- org.apache.geode
+ com.vmware.gemfiregeode-coreruntime
- org.apache.geode
+ com.vmware.gemfiregeode-gfshruntime
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/distributed/DistributedSystemFindDistributedMembersDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/distributed/DistributedSystemFindDistributedMembersDUnitTest.java
new file mode 100644
index 000000000000..09edc0c75d37
--- /dev/null
+++ b/geode-core/src/distributedTest/java/org/apache/geode/distributed/DistributedSystemFindDistributedMembersDUnitTest.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.geode.distributed;
+
+import static java.util.Arrays.asList;
+import static org.apache.geode.distributed.ConfigurationProperties.LOCATORS;
+import static org.apache.geode.test.dunit.VM.getVM;
+import static org.apache.geode.test.dunit.rules.DistributedRule.getLocators;
+import static org.assertj.core.api.Assertions.assertThat;
+
+import java.io.Serializable;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.List;
+import java.util.Properties;
+import java.util.Set;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.geode.distributed.internal.InternalDistributedSystem;
+import org.apache.geode.internal.inet.LocalHostUtil;
+import org.apache.geode.test.dunit.VM;
+import org.apache.geode.test.dunit.rules.DistributedReference;
+
+@SuppressWarnings({"serial", "deprecation"})
+public class DistributedSystemFindDistributedMembersDUnitTest implements Serializable {
+
+ @Rule
+ public DistributedReference system = new DistributedReference<>();
+
+ @Before
+ public void setUp() {
+ Properties configProperties = new Properties();
+ configProperties.setProperty(LOCATORS, getLocators());
+
+ for (VM vm : asList(getVM(0), getVM(1), getVM(2))) {
+ vm.invoke(() -> {
+ system.set((InternalDistributedSystem) DistributedSystem.connect(configProperties));
+ });
+ }
+ }
+
+ @Test
+ public void findDistributedMembersForLocalHostReturnsManyMembers() throws UnknownHostException {
+ InetAddress localHost = LocalHostUtil.getLocalHost();
+
+ List serverVMs = asList(getVM(0), getVM(1), getVM(2));
+ for (VM vm : serverVMs) {
+ vm.invoke(() -> {
+ Set members = system.get().findDistributedMembers(localHost);
+ // number of servers plus one locator
+ assertThat(members).hasSize(serverVMs.size() + 1);
+ });
+ }
+ }
+}
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/ClearDuringGiiOplogWithMissingCreateRegressionTest.java b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/ClearDuringGiiOplogWithMissingCreateRegressionTest.java
index f8fad0d6c265..2d376c2f9824 100644
--- a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/ClearDuringGiiOplogWithMissingCreateRegressionTest.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/ClearDuringGiiOplogWithMissingCreateRegressionTest.java
@@ -212,7 +212,7 @@ public RegionEntry createEntry(RegionEntryContext r, Object key, Object value) {
}
@Override
- public Class getEntryClass() {
+ public Class> getEntryClass() {
return TestableDiskRegionEntry.class;
}
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/GiiDiskAccessExceptionRegressionTest.java b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/GiiDiskAccessExceptionRegressionTest.java
index 5e8202de24fa..2508d4905874 100644
--- a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/GiiDiskAccessExceptionRegressionTest.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/GiiDiskAccessExceptionRegressionTest.java
@@ -191,7 +191,7 @@ public RegionEntry createEntry(RegionEntryContext context, Object key, Object va
}
@Override
- public Class getEntryClass() {
+ public Class> getEntryClass() {
return getClass();
}
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PRCustomPartitioningDistributedTest.java b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PRCustomPartitioningDistributedTest.java
index b0bf9b84f27c..5f52dd9b9683 100755
--- a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PRCustomPartitioningDistributedTest.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PRCustomPartitioningDistributedTest.java
@@ -15,6 +15,7 @@
package org.apache.geode.internal.cache;
import static org.apache.geode.test.dunit.VM.getVM;
+import static org.apache.geode.util.internal.UncheckedUtils.uncheckedCast;
import static org.assertj.core.api.Assertions.assertThat;
import java.io.Serializable;
@@ -133,9 +134,9 @@ private void verifyKeys(final String regionName, final List listOfKeys) {
Set