Configuring Java CAPS JBI Components for GlassFish Clustering

ProcedureTo Create a GlassFish Cluster

  1. If it is not already running, start the GlassFish server you want to configure for clustering.

    You can start the server from the command line or from the Services tab in NetBeans.

  2. Once the server is started, launch the Admin Console by doing one of the following:

    • On the Services tab in NetBeans, right-click the server and select View Admin Console.

    • Launch a web browser and enter the following URL:

      http://hostname:port

      • hostname is the name of the machine where the server is located, and can be localhost.

      • port is the administrative port number, which is 4848 by default.

  3. On the main Admin Console page, click Add Cluster Support.

    Figure shows the clustering option on the GlassFish
Admin Console.
  4. Review the information on the Add Cluster Support page, and then click OK.

  5. On the Restart Required page, click Stop Instance to stop the GlassFish server.

  6. Follow the instructions on the Admin Console to restart the server.

  7. Run the following command to create the node agent, using a unique value for the node agent name:

    GlassFish_Home/bin/asadmin create-node-agent NodeAgent_Name

  8. Run the following command to start the node agent:

    GlassFish_Home/bin/asadmin start-node-agent NodeAgent_Name

  9. When the node agent is started, log back in to the GlassFish Admin Console and create the cluster:

    1. In the navigation bar on the left, click Clusters.

    2. On the Clusters page, click New.

    3. Enter a name for the cluster, and then click OK.

      Figure shows the New Cluster page on the Admin
Console.
  10. Add instances to the cluster:

    1. In the navigation bar on the left, expand Clusters and then select the cluster you just created.

    2. Click the Instances tab.

    3. Under Server Instances, click New.

    4. Enter a name for the instance, select the node agent you just created, and then click OK.

      Figure shows the New Clustered Server Instance
page of the Admin Console.
    5. Repeat the above steps to add each instance to the cluster.

  11. To start the cluster, select Clusters in the left navigation bar, select the check box next the cluster you just created, and then click Start Cluster.

  12. Click OK on the dialog box that appears.


    Tip –

    Log files for the cluster are located at GlassFish_Home/nodeagents/cluster-nodeagent/agent/logs.