Page tree
Skip to end of metadata
Go to start of metadata

To install an IBM WebSphere Configuration that creates a cluster, you can choose from the following methods:

  • Request the creation of clusters through the Install tab of the Server Profile, by selecting the Create Clusters check box and specifying the number of servers per node. Then include the ClusterName attribute in each relevant Server element in the Configuration, as illustrated by the following example:

    Example

    <Server developmentMode="false" name="serverH"
        parallelStartEnabled="true" serverType="APPLICATION_SERVER"
        ClusterName="clusterH">
    </Server>
    
  • Create the cluster through the Server element in the Configuration. To accomplish this, include not only the ClusterName attribute in the Server element, but also the CreateCluster and MembersPerNode attributes. Note that the name of the server must include one of the special cluster tokens described in Tokenizing WebSphere server names in a cluster, such as %i or %x (otherwise, only one server member is created and the MembersPerNode attribute is ignored). The following XML lines display an example for this method:

    Example

    <Server developmentMode="false" name="serverH%x" CreateCluster="true"
         parallelStartEnabled="true" serverType="APPLICATION_SERVER"
         MembersPerNode="3" ClusterName="clusterH">
    </Server>
    
  • Create the cluster and define its member servers through an independent ServerCluster element in the Configuration, as in the following example:

    Example

    <Server developmentMode="false" name="serverB"
        parallelStartEnabled="true"
        serverType="APPLICATION_SERVER"/>
    <Server developmentMode="false" name="serverC"
        parallelStartEnabled="true"
        serverType="APPLICATION_SERVER"/>
    
    <ServerCluster Classification="Cell" Target="Cell" enableHA="false"
        name="testCluster2" nodeGroupName="DefaultNodeGroup"
        preferLocal="true">
        <ClusterMember memberName="serverB" nodeName="was70dmgrNode01" 
            weight="2"/>
        <ClusterMember memberName="serverC" nodeName="was70dmgrNode01" 
            weight="4"/>
    </ServerCluster>
    

For a horizontal cluster, in which cluster members are defined on multiple nodes, specify the target node for each server by including the Classification attribute within the Server element. The value of the Classification attribute must correspond to the label that you defined for a node through the Nodes tab of the Server Profile (see Nodes tab).

You can also tokenize the names of servers in the cluster through the Server element's name attribute, using a special type of token described in Tokenizing WebSphere server names in a cluster.

If you want to modify or install elements within an existing cluster through a Configuration that contains only resources (that is, does not contain the cluster or its server members), you must include the ServerCluster element in the Configuration, along with just the name and Target attributes. In addition, each resource element is associated with the cluster through a Target attribute. The following example illustrate how to install elements to an existing cluster:

Example

<JDBCProvider Target="cluster1"
      description="Test JDBC Provider (XA) for Cloudscape"
      implementationClassName="com.ibm.db2j.jdbc.DB2jXADataSource"
      name="Test JDBC Provider (XA)"
      xa="true" />
<ServerCluster name="cluster1" Target="Cell"/>