From 73c2dfffeda36b3df4258fdce8d618bd93e02019 Mon Sep 17 00:00:00 2001 From: Sarah Date: Tue, 15 Dec 2020 13:10:27 -0500 Subject: [PATCH 1/7] Update geode-store version --- config/tomcat.yml | 4 ++-- .../container/tomcat/tomcat_geode_store.rb | 24 ++----------------- ...ainer_tomcat_geode_store_context_after.xml | 2 +- 3 files changed, 5 insertions(+), 25 deletions(-) diff --git a/config/tomcat.yml b/config/tomcat.yml index bd31372868..ccab76de31 100644 --- a/config/tomcat.yml +++ b/config/tomcat.yml @@ -40,5 +40,5 @@ redis_store: timeout: 2000 connection_pool_size: 2 geode_store: - version: 0.+ - repository_root: https://repo.spring.io/ext-release-local/geode-store + version: 1.13.+ + repository_root: https://tgf4vms-session-state-buildpack-dependencies.s3-us-west-2.amazonaws.com diff --git a/lib/java_buildpack/container/tomcat/tomcat_geode_store.rb b/lib/java_buildpack/container/tomcat/tomcat_geode_store.rb index 406bcc384d..31ddfc84c2 100644 --- a/lib/java_buildpack/container/tomcat/tomcat_geode_store.rb +++ b/lib/java_buildpack/container/tomcat/tomcat_geode_store.rb @@ -63,7 +63,7 @@ def supports? KEY_LOCATORS = 'locators' KEY_USERS = 'users' - SESSION_MANAGER_CLASS_NAME = 'org.apache.geode.modules.session.catalina.Tomcat8DeltaSessionManager' + SESSION_MANAGER_CLASS_NAME = 'org.apache.geode.modules.session.catalina.Tomcat9DeltaSessionManager' REGION_ATTRIBUTES_ID = 'PARTITION_REDUNDANT_HEAP_LRU' CACHE_CLIENT_LISTENER_CLASS_NAME = 'org.apache.geode.modules.session.catalina.ClientServerCacheLifecycleListener' @@ -71,16 +71,10 @@ def supports? SCHEMA_INSTANCE_URL = 'http://www.w3.org/2001/XMLSchema-instance' SCHEMA_LOCATION = 'http://geode.apache.org/schema/cache http://geode.apache.org/schema/cache/cache-1.0.xsd' LOCATOR_REGEXP = Regexp.new('([^\\[]+)\\[([^\\]]+)\\]').freeze - FUNCTION_SERVICE_CLASS_NAMES = [ - 'org.apache.geode.modules.util.CreateRegionFunction', - 'org.apache.geode.modules.util.TouchPartitionedRegionEntriesFunction', - 'org.apache.geode.modules.util.TouchReplicatedRegionEntriesFunction', - 'org.apache.geode.modules.util.RegionSizeFunction' - ].freeze private_constant :FILTER, :KEY_LOCATORS, :KEY_USERS, :SESSION_MANAGER_CLASS_NAME, :REGION_ATTRIBUTES_ID, :CACHE_CLIENT_LISTENER_CLASS_NAME, :SCHEMA_URL, :SCHEMA_INSTANCE_URL, :SCHEMA_LOCATION, - :LOCATOR_REGEXP, :FUNCTION_SERVICE_CLASS_NAMES + :LOCATOR_REGEXP def cluster_operator?(user) user['username'] == 'cluster_operator' || user['roles'] && (user['roles'].include? 'cluster_operator') @@ -94,20 +88,6 @@ def add_client_cache(document) 'version' => '1.0' add_pool client_cache - add_function_service client_cache - end - - def add_functions(function_service) - FUNCTION_SERVICE_CLASS_NAMES.each do |function_class_name| - function = function_service.add_element 'function' - class_name = function.add_element 'class-name' - class_name.add_text(function_class_name) - end - end - - def add_function_service(client_cache) - function_service = client_cache.add_element 'function-service' - add_functions function_service end def add_listener(server) diff --git a/spec/fixtures/container_tomcat_geode_store_context_after.xml b/spec/fixtures/container_tomcat_geode_store_context_after.xml index ea4a8b558e..8eb45842b4 100644 --- a/spec/fixtures/container_tomcat_geode_store_context_after.xml +++ b/spec/fixtures/container_tomcat_geode_store_context_after.xml @@ -16,5 +16,5 @@ ~ limitations under the License. --> - + From b5365792bac6a37401cd2197ceb3f16f0f50d784 Mon Sep 17 00:00:00 2001 From: Sarah Date: Tue, 15 Dec 2020 14:14:46 -0500 Subject: [PATCH 2/7] Fix expected client-cache.xml for geode-store --- ...ainer_tomcat_geode_store_cache_client_after.xml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/spec/fixtures/container_tomcat_geode_store_cache_client_after.xml b/spec/fixtures/container_tomcat_geode_store_cache_client_after.xml index b68c118145..41e41f1612 100644 --- a/spec/fixtures/container_tomcat_geode_store_cache_client_after.xml +++ b/spec/fixtures/container_tomcat_geode_store_cache_client_after.xml @@ -4,18 +4,4 @@ - - - org.apache.geode.modules.util.CreateRegionFunction - - - org.apache.geode.modules.util.TouchPartitionedRegionEntriesFunction - - - org.apache.geode.modules.util.TouchReplicatedRegionEntriesFunction - - - org.apache.geode.modules.util.RegionSizeFunction - - From 776cd74d7d6d8eebfcd57e1156063c39f49c14af Mon Sep 17 00:00:00 2001 From: Sarah Date: Mon, 11 Jan 2021 13:56:26 -0500 Subject: [PATCH 3/7] Update geode store repo root --- config/tomcat.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/tomcat.yml b/config/tomcat.yml index ccab76de31..5e47bee503 100644 --- a/config/tomcat.yml +++ b/config/tomcat.yml @@ -41,4 +41,4 @@ redis_store: connection_pool_size: 2 geode_store: version: 1.13.+ - repository_root: https://tgf4vms-session-state-buildpack-dependencies.s3-us-west-2.amazonaws.com + repository_root: https://apache-geode-session-state-buildpack-dependencies.s3-us-west-2.amazonaws.com From 2b82a918b164181cd5c622f852bac4eb95a56fc8 Mon Sep 17 00:00:00 2001 From: Sarah Date: Mon, 11 Jan 2021 14:25:46 -0500 Subject: [PATCH 4/7] Update geode store repo root --- config/tomcat.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/tomcat.yml b/config/tomcat.yml index 5e47bee503..fee2c18492 100644 --- a/config/tomcat.yml +++ b/config/tomcat.yml @@ -41,4 +41,4 @@ redis_store: connection_pool_size: 2 geode_store: version: 1.13.+ - repository_root: https://apache-geode-session-state-buildpack-dependencies.s3-us-west-2.amazonaws.com + repository_root: https://apache-geode-tomcat-session-buildpack-dependencies.s3-us-west-2.amazonaws.com From eb308ce0b6466c932653016e869e197c0103beed Mon Sep 17 00:00:00 2001 From: Sarah Date: Tue, 19 Jan 2021 17:10:37 -0500 Subject: [PATCH 5/7] Update geode store repo root --- config/tomcat.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/tomcat.yml b/config/tomcat.yml index fee2c18492..5c9aefc730 100644 --- a/config/tomcat.yml +++ b/config/tomcat.yml @@ -41,4 +41,4 @@ redis_store: connection_pool_size: 2 geode_store: version: 1.13.+ - repository_root: https://apache-geode-tomcat-session-buildpack-dependencies.s3-us-west-2.amazonaws.com + repository_root: https://java-buildpack-tomcat-gemfire-store.s3-us-west-2.amazonaws.com From 92cbc4dc6b0c698448b5e8e011a87c8b0857c0f1 Mon Sep 17 00:00:00 2001 From: Sarah Date: Fri, 22 Jan 2021 12:36:52 -0500 Subject: [PATCH 6/7] Update product name in container-tomcat.md --- docs/container-tomcat.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/container-tomcat.md b/docs/container-tomcat.md index 246f8c7047..b9836daef9 100644 --- a/docs/container-tomcat.md +++ b/docs/container-tomcat.md @@ -92,8 +92,8 @@ By default, the Tomcat instance is configured to store all Sessions and their da ### Redis To enable Redis-based session replication, simply bind a Redis service containing a name, label, or tag that has `session-replication` as a substring. -### Pivotal Cloud Cache -To enable session state caching on 'Pivotal Cloud Cache', bind to a 'Pivotal Cloud Cache' service instance who's name either ends in `-session-replication` or is tagged with `session-replication`. +### Tanzu GemFire for VMs +To enable session state caching on 'Tanzu GemFire for VMs', bind to a 'Tanzu GemFire' service instance whose name either ends in `-session-replication` or is tagged with `session-replication`. Service instances can be created with a tag: From 448adeef2bd3489a19c2a859b19af09592266790 Mon Sep 17 00:00:00 2001 From: Sarah Date: Fri, 22 Jan 2021 12:39:35 -0500 Subject: [PATCH 7/7] Remove single quotes from product name --- docs/container-tomcat.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/container-tomcat.md b/docs/container-tomcat.md index b9836daef9..afefcb3a6f 100644 --- a/docs/container-tomcat.md +++ b/docs/container-tomcat.md @@ -93,7 +93,7 @@ By default, the Tomcat instance is configured to store all Sessions and their da To enable Redis-based session replication, simply bind a Redis service containing a name, label, or tag that has `session-replication` as a substring. ### Tanzu GemFire for VMs -To enable session state caching on 'Tanzu GemFire for VMs', bind to a 'Tanzu GemFire' service instance whose name either ends in `-session-replication` or is tagged with `session-replication`. +To enable session state caching on Tanzu GemFire for VMs, bind to a Tanzu GemFire service instance whose name either ends in `-session-replication` or is tagged with `session-replication`. Service instances can be created with a tag: