diff --git a/config/tomcat.yml b/config/tomcat.yml index bd31372868..5c9aefc730 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://java-buildpack-tomcat-gemfire-store.s3-us-west-2.amazonaws.com diff --git a/docs/container-tomcat.md b/docs/container-tomcat.md index 246f8c7047..afefcb3a6f 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: 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_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 - - 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. --> - +