GlassFishV2Failover

GlassFish V2 Fail-over Demo (5 Minutes)

Description

In this demo we show off how easy it is to set up a multi-machine cluster configured for high-availability using the GlassFish's admin console. We then run a stateful application to demonstrate successful and transparent fail-over. Much of this demo was pulled from Anissa's blog.

Product Versions Supported

GlassFish V2

Points to Hit

  • A HA cluster is easy to configure
  • Fail-over is transparent to the user

Demo Prep

On Machine One

  • Install SJSWS 7.0
  • Download and install SJSAS9.1 (not GlassFish V2 because we also need the load balancer plugin to be installed to SJSWS 7.0. If you already have GFV2 installed, you can use the SJSAS 9.1 installer to just install the lb plugin. See ForMoreDetails| here).
  • Create an clusterable Domain Admin Server (DAS)
  • asadmin create-domain --profile cluster --adminport 4849 domainCluster
  • Start the cluster domain
  • asadmin start-domain domainCluster
  • Create and start a Node Agent the on the DAS machine (MachineOne)
  • asadmin create-node-agent --host <DASMachine> --port 4849 agent<Hostname>
  • asadmin start-node-agent agent<Hostname>

On Machine Two

  • Install GF V2
  • Create and start a Node Agent on the 2nd Machine
  • asadmin create-node-agent --host <DASMachine> --port 4849 agent<Hostname>
  • asadmin start-node-agent agent<Hostname>

Gotchas

  • SJSAS7.0 is not available for the Mac

Demo

  • Explain what has been set up thus far - basically we have a domain with 2 machines registered. Using this setup we can create our cluster of instances.
  • Log into the Admin Console: http://<DASMachine>:4849
  • Click on the Cluster node on the tree
  • Create a cluster
  • Click on the New button on the Server Instance table:
  • Enter *instance1* and select the 1st machine's node agent.
  • Click the New button again:
  • Enter *instance2* and select the 2nd machine's node agent.


Demo Cleanup

These are the necessary steps to take in order to successfully run the demo again on the same machine.


Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo