Sun GlassFish Enterprise Server v2.1.1 Administration Reference

cluster

Defines a cluster.


Note –

Some topics in the documentation pertain to features that are available only in domains that are configured to support clusters. Examples of domains that support clusters are domains that are created with the cluster profile or the enterprise profile. For information about profiles, see Usage Profiles in Sun GlassFish Enterprise Server v2.1.1 Administration Guide.


Superelements

clusters

Subelements

The following table describes subelements for the cluster element.

Table 1–23 cluster Subelements

Element 

Required 

Description 

server-ref

zero or more 

References a server instance that belongs to the cluster. 

resource-ref

zero or more 

References a resource deployed to the cluster. 

application-ref

zero or more 

References an application or module deployed to the cluster. 

system-property

zero or more 

Specifies a system property. 

property

zero or more 

Specifies a property or a variable. 

Attributes

The following table describes attributes for the cluster element.

Table 1–24 cluster Attributes

Attribute 

Default 

Description 

name

none 

Specifies the name of the cluster. 

config-ref

default config element’s name attribute value, server-config

References the configuration used by the cluster. 

heartbeat-port

none; value automatically generated 

Specifies the communication port the Group Management Service uses to listen for group events. Must be a valid port number. 

heartbeat-address

none; value automatically generated 

Specifies the address the Group Management Service uses to listen for group events. Must be a multicast address. 

heartbeat-enabled

false (developer profile)

true (cluster and enterprise profiles)

(optional) If true, the Group Management Service is started as a lifecycle module in each server instance in the cluster and in the Domain Administration Server. The Domain Administration Server participates in each cluster that has this attribute set to true.

Properties

The following table describes properties for the cluster element.

Table 1–25 cluster Properties

Property 

Default 

Description 

gms-bind-interface-address

none 

Specifies which address the group management service uses on a multi-home machine. If a machine has only one network interface, there is no need to set this property. 

If this property is not set or is set to an invalid value on a multi-home machine, Enterprise Server uses all available addresses. The primary address is nondeterministic, because the ordering of addresses is specific to the operating system, not the Java network API used to access the network interfaces. 

You can create system-property elements to set this value differently for each server instance in the cluster. For example:

<domain>
    ...
    <clusters>
        <cluster name="cluster1" ... >
            ...
            <property name="gms-bind-interface-address"
                value="${GMS_CLUSTER1_BIND_IF_ADDR}"/>
        </cluster>
        ...
    </clusters>
    ...
    <servers>
        <server name="server1" ... >
            ...
            <system-property name="GMS_CLUSTER1_BIND_IF_ADDR"
                value="123.456.78.910"/>
        </server>
        ...
    </servers>
    ...
</domain>