Session clustering

Building a cluster using GlassFish is a little tricky and involves using both command line and the admin panel, but it is completely doable! Let's check it out.

First, you need two or more instances (called nodes) up and running. You can do it in any way you like—each one running in a different machine, using virtual machines or containers (my favorite option). Either way you choose, the way of getting the cluster up is the same:

  1. So, get your first node and open its admin panel:

https://[hostname]:4848

  1. Click on the Clusters option in the left menu and then click on the New button. Name the cluster myCluster and click on the OK button.
  2. Select your cluster from the list. In the opened page, select the Instances option ...

Get Java EE 8 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.