Configuring Java CAPS JBI Components for GlassFish Clustering

JBI Component Clustering Overview

Java CAPS JBI components rely on the clustering capabilities of GlassFish Enterprise Server (ES) for clustering and high-availability. In addition, most components can be configured for different levels of load-balancing and failover. This document describes how the JBI components use the clustering capabilities of GlassFish, but does not provide detailed information about GlassFish clustering. A section is provided on basic cluster setup. For detailed information about high availability and clustering in GlassFish, see the Sun GlassFish Enterprise Server 2.1 High Availability Administration Guide.

The following topics provide overview information about clustering, JBI component clustering, and the steps required to set up a cluster.

Clustering Overview

A cluster is a collection of application server instances that can distribute processing among clustered application instances. This provides optimal performance and scalability, along with high availability and failover capabilities for reliability. Implementing JBI applications in a clustered environment ensures continuous processing even when there is a hardware or software failure.

The instances in a cluster share the same set of Java CAPS JBI applications, resources, and configuration information, and can be implemented on one server or can extend over multiple servers. A clustered instance belongs to only one cluster, through there can be multiple clusters on a domain. All settings for a cluster are defined in a single configuration file named cluster_name-config.

In a cluster configuration for JBI components, each component is added to a GlassFish cluster and any Service Assemblies (SA) are deployed to the cluster. Adding a component to a cluster adds the component to all instances of the cluster. Similarly, deploying an SA to a cluster deploys it to all the cluster instances.

Component Support for Clustering

All Java CAPS JBI components are supported in a clustered environment. Some components work inherently in a clustered environment and some require special configuration, notably in the areas of load balancing and failover. Stateful service engines (SEs), such as BPEL SE and IEP SE, use a persistence database to track cluster instances and distribute work. Other components, such as the Scheduler BC, Data Mashup SE, and LDAP BC, work inherently in a clustered environment without needing to know about the different instances.

The BPEL SE and IEP SE provide additional support for clustering at a component level for backwards compatibility. This means that multiple SE instances can be deployed on one GlassFish server in a non-clustered environment. This allows for persistence, high-availability, and failover without using a GlassFish server cluster for all components.

Load Balancing and Failover

Load balancing and failover functions depend on the individual components in the cluster. For example, load balancing is not applicable to Service Engines (SE), and is protocol specific for some of the Binding Components (BC). For example, the HTTP Load Balancer is required for SOAP transactions, while the File BC, JMS BC, and FTP BC all have built-in load balancing.

GlassFish provides additional support for high availability, load balancing, and failover with the HTTP Load Balancer plug-in. The HTTP Load Balancer distributes incoming HTTP and HTTPS transactions among the instances in a cluster and also fails over requests to another server instance if the original server instance becomes unavailable. The HTTP BC does not have its own load balancing capabilities, making the HTTP Load Balancer plug-in a useful tool when implementing the HTTP BC in a clustered environment. For more information, see Chapter 5, Configuring HTTP Load Balancing, in Sun GlassFish Enterprise Server 2.1 High Availability Administration Guide.

Load balancing and failover for the JMS BC is provided through a JMS broker cluster. For more information, see Chapter 10, Java Message Service Load Balancing and Failover, in Sun GlassFish Enterprise Server 2.1 High Availability Administration Guide.

Clustering Setup Summary

Below are the general steps for setting up clustering for Java CAPS JBI components. Each step is described in detail in later topics. Note that all setup and configuration tasks are performed using command line functions or the GlassFish Admin Console. NetBeans cannot be used for clustering setup because it does not support or recognize GlassFish clustering.

  1. Create a GlassFish cluster, as described in Creating a GlassFish Cluster.

  2. Add any necessary libraries to the cluster, as described in To Add a Shared Library to a Cluster.

  3. Add the Service Engines and Binding Components to the cluster, as described in To Add a Java CAPS JBI Component to a Cluster.

  4. Make any necessary configuration changes to the Service Engines and Binding Components. This is described in individual sections for each component.

  5. Deploy the Service Assembly to the cluster, as described in Deploying a Service Assembly to a Cluster.

Instructions for standalone (component-level) clustering are provided in the following topics: