You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by db...@apache.org on 2021/07/19 21:13:53 UTC

[geode-examples] branch support/1.14 updated: GEODE-9430: update Tomcat sessionState example (#108)

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

dbarnes pushed a commit to branch support/1.14
in repository https://gitbox.apache.org/repos/asf/geode-examples.git


The following commit(s) were added to refs/heads/support/1.14 by this push:
     new 4415933  GEODE-9430: update Tomcat sessionState example (#108)
4415933 is described below

commit 44159335d3abac9b60e448b358d8a7c689684311
Author: Dave Barnes <db...@apache.org>
AuthorDate: Mon Jul 19 13:42:00 2021 -0700

    GEODE-9430: update Tomcat sessionState example (#108)
    
    * GEODE-9430: update sessionState example and README with more generic Tomcat info
---
 .gitignore                            |  2 ++
 sessionState/README.md                | 31 ++++++++++++++++++-------------
 sessionState/scripts/example-setup.sh | 34 ++++++++++++++++++----------------
 3 files changed, 38 insertions(+), 29 deletions(-)

diff --git a/.gitignore b/.gitignore
index 3628a92..f34a209 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,6 +15,8 @@ build-eclipse/
 out/
 
 locator
+locator1
+l1
 server
 server1
 server2
diff --git a/sessionState/README.md b/sessionState/README.md
index 8fe9ccd..1e09cc2 100644
--- a/sessionState/README.md
+++ b/sessionState/README.md
@@ -23,30 +23,35 @@ This example assumes you have Geode and Java installed. It also assumes you have
 It was designed and tested with Geode 1.9.0 and Tomcat 9, and while the session features will work with other combinations
 you may need to make some changes to the setup if you're using other versions. For more information about how to set up
 the tomcat module with your version of Tomcat and Geode see the official documentation at: 
-https://geode.apache.org/docs/guide/19/tools_modules/http_session_mgmt/tomcat_installing_the_module.html
+`https://geode.apache.org/docs/guide/19/tools_modules/http_session_mgmt/tomcat_installing_the_module.html`
 
 ##Steps
 
-1. Set the environment Variable $CATALINA_HOME to point at the root directory of your local Tomcat installation. This is required by 
-Tomcat, so in some cases this may have already been set.
+1. Set the environment Variable $CATALINA_HOME to point at the root directory of your local Tomcat installation. This is a 
+Tomcat convention, so in some cases this may have already been set.
 
 2. Find the configuration files located at $CATALINA_HOME/conf/. To the server.xml file add the line:
-```
+
+  ```
 <Listener className="org.apache.geode.modules.session.catalina.ClientServerCacheLifecycleListener"/>
-```
+  ```
 
-and to the file context.xml add the line:
-```
+  and to the file context.xml add the line:
+
+  ```
 <Manager className="org.apache.geode.modules.session.catalina.Tomcat9DeltaSessionManager"/> 
-```
+  ```
+
 3. Run the setup script:
-```
-./example-setup.sh <root directory of Geode install>
-```
+
+  ```
+  cd scripts
+  ./example-setup.sh <root directory of Geode install>
+  ```
 
 Specify the root directory of your local Geode installation. Make sure you have no local Geode cluster running, as this step will start
-a new local cluster to manage our Session States. This can be done by running gfsh from your geode installation and running a connect
-command with no parameters. If a cluster is found, use the shutdown command to stop the cluster before continuting.
+a new local cluster to manage our Session States. This can be done by running gfsh from your geode installation and running a `connect`
+command with no parameters. If a cluster is found, use the shutdown command to stop the cluster before continuing.
 
 4. Run the tomcat startup script located at $CATALINA_HOME/bin/startup.sh. You should now be able to reach the example webapp by entering
 the following URL into your browser:
diff --git a/sessionState/scripts/example-setup.sh b/sessionState/scripts/example-setup.sh
index 1098475..4d85ad3 100755
--- a/sessionState/scripts/example-setup.sh
+++ b/sessionState/scripts/example-setup.sh
@@ -19,25 +19,27 @@ GEODE_LOCATION=${1%/}
 CATALINA_LOCATION=${CATALINA_HOME%/}
 
 #Copy all nessessary lib files into tomcats lib directory
-cp $GEODE_LOCATION/lib/antlr-2.7.7.jar $CATALINA_LOCATION/lib/
-cp $GEODE_LOCATION/lib/commons-io-2.6.jar $CATALINA_LOCATION/lib/
-cp $GEODE_LOCATION/lib/commons-lang3-3.8.1.jar $CATALINA_LOCATION/lib/
-cp $GEODE_LOCATION/lib/commons-validator-1.6.jar $CATALINA_LOCATION/lib/
-cp $GEODE_LOCATION/lib/fastutil-8.2.2.jar $CATALINA_LOCATION/lib/
-cp $GEODE_LOCATION/lib/geode-core-1.9.0.jar $CATALINA_LOCATION/lib/
-cp $GEODE_LOCATION/lib/javax.transaction-api-1.3.jar $CATALINA_LOCATION/lib/
-cp $GEODE_LOCATION/lib/jgroups-3.6.14.Final.jar $CATALINA_LOCATION/lib/
-cp $GEODE_LOCATION/lib/log4j-api-2.11.1.jar $CATALINA_LOCATION/lib/
-cp $GEODE_LOCATION/lib/log4j-core-2.11.1.jar $CATALINA_LOCATION/lib/
-cp $GEODE_LOCATION/lib/log4j-jul-2.11.1.jar $CATALINA_LOCATION/lib/
-cp $GEODE_LOCATION/lib/shiro-core-1.4.0.jar $CATALINA_LOCATION/lib/
-cp $GEODE_LOCATION/lib/geode-common-1.9.0.jar $CATALINA_LOCATION/lib/
-cp $GEODE_LOCATION/lib/geode-management-1.9.0.jar $CATALINA_LOCATION/lib/
-cp $GEODE_LOCATION/lib/micrometer-core-1.1.3.jar $CATALINA_LOCATION/lib/
+cp $GEODE_LOCATION/lib/commons-io-*.jar $CATALINA_LOCATION/lib/
+cp $GEODE_LOCATION/lib/commons-lang3-*.jar $CATALINA_LOCATION/lib/
+cp $GEODE_LOCATION/lib/commons-validator-*.jar $CATALINA_LOCATION/lib/
+cp $GEODE_LOCATION/lib/fastutil-*.jar $CATALINA_LOCATION/lib/
+cp $GEODE_LOCATION/lib/geode-core-*.jar $CATALINA_LOCATION/lib/
+cp $GEODE_LOCATION/lib/geode-logging-*.jar $CATALINA_LOCATION/lib/
+cp $GEODE_LOCATION/lib/javax.transaction-api-*.jar $CATALINA_LOCATION/lib/
+cp $GEODE_LOCATION/lib/jgroups-*.jar $CATALINA_LOCATION/lib/
+cp $GEODE_LOCATION/lib/log4j-api-*.jar $CATALINA_LOCATION/lib/
+cp $GEODE_LOCATION/lib/log4j-core-*.jar $CATALINA_LOCATION/lib/
+cp $GEODE_LOCATION/lib/log4j-jul-*.jar $CATALINA_LOCATION/lib/
+cp $GEODE_LOCATION/lib/shiro-core-*.jar $CATALINA_LOCATION/lib/
+cp $GEODE_LOCATION/lib/geode-common-*.jar $CATALINA_LOCATION/lib/
+cp $GEODE_LOCATION/lib/geode-management-*.jar $CATALINA_LOCATION/lib/
+cp $GEODE_LOCATION/lib/geode-tcp-server-*.jar $CATALINA_LOCATION/lib/
+cp $GEODE_LOCATION/lib/geode-membership-*.jar $CATALINA_LOCATION/lib/
+cp $GEODE_LOCATION/lib/micrometer-core-*.jar $CATALINA_LOCATION/lib/
 cp $CATALINA_HOME/bin/tomcat-juli.jar $CATALINA_HOME/lib/
 
 #Unzip Tomcat Module conf/lib files into tomcats conf/lib directories
-unzip -o $1/tools/Modules/Apache_Geode_Modules-1.9.0-Tomcat.zip -d $CATALINA_HOME/
+unzip -o $1/tools/Modules/Apache_Geode_Modules-*-Tomcat.zip -d $CATALINA_HOME/
 
 export CLASSPATH=$CATALINA_HOME/lib/*