Skip to content

OmniFish-EE/clusterjsp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

A tester application for session replication in GlassFish

This application test the session replication works on a GlassFish cluster.

Usage

In order to test session replication, you need to have one of the following setups:

  • run all the GlassFish instances locally, on the same IP address, different ports, no load balancer needed
  • run GlassFish insances on different IP addresses, with a load balancer, access the application using the load balancer

First, access instance A (here named server1) and store some data to the HTTP session (e.g. name=OmniFish).

image

Then access instance B (using the same IP address or domain as instance A). Instance B should report the same data stored in instance A - data is replicated.

image

If all instances run on the same IP, you can access the instance A and instance Bdirectly, using IP and port. The browser will send the session cookie to all instances.

If instances run behind a load balancer server, always access the application via the load balancer server. First, make the load balancer only work with instance A, then make it work with instance B.

Build

mvn install

Run the application

Create a cluster in GlassFish

image

Deploy the application

When deploying, enable availability and select the cluster as the target:

image

image

About

A cluster HTTP session tester app

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages