Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Each geronimo cluster member must have a unique jvmRoute designation for both load balancing and session replication. The jvmRoute attribute allows the mod-jk load balancer to provide sticky httpsession (sending all requests for a session to the same cluster member). The load balancer places the jvmRoute value in the session cookie or encoded url that is returned to the web browser.

For Geronimo v1, you need to should specify the jvmRoute on the cmdline when the server is started.

Specifically, "java -DjvmRoute=nodeX -jar bin/server.jar"

nodeX should have a unique value for each geronimo cluster member

In the near future, the jvmRoute attribute will be configurable via the var/config/config.xml file.

Go ahead and start the geronimo server on each cluster member now specifying the correct jvmRoute value.

Now that the jvmRoute is set correctly for each cluster member. You must deploy the example on each of the cluster members. For this example, the applications are slightly different for each cluster member. The difference is merely to indicate the current Server number (e.g. Server 1, Server 2) in the output of the application. This will be useful when trying to determine which cluster member is servicing the http request from the browser.

Start the geronimo server on each cluster member and then install the Install the attached applications to the appropriate cluster member assuring that you use the correct deployment plan for each member. Note that the deployment plan must be updated with the hostname (or IP address) for each machine. The appropriate spots are identified in the plans with xx.yy.zz.aa.

...

Once you get the applications installed on each cluster member, you can test httpsession replication by hitting the application with your favorite browser. Probably something like: http://localhost:8080/servlets-examples-cluster/servlet/SessionExample . Note that the output page contains the ID of the server that is servicing the request. In your browser window, fill in the appropriate input fields and hit the submit button. The depending on the tomcat vesion, the console dialogue (the prompt where you started geronimo) should might show that the httpsession data is being transmitted and received between the cluster members.

...