Configuring a Simple tc Runtime Cluster

In this section you set up a simple tc Runtime cluster that uses default values for most configuration options. A description of this default cluster configuration follows the procedure.

  1. For each tc Runtime instance that will be a member of the cluster, update its CATALINA_BASE/conf/server.xml by adding a <Cluster> child-element of the <Engine> element, as shown in the following example (only relevant sections shown):

    <?xml version='1.0' encoding='utf-8'?>
    <Server port="-1" shutdown="SHUTDOWN">
      ...
      <Service name="Catalina">
        ...
        <Engine name="Catalina" defaultHost="localhost">
            <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
            ...
        </Engine> 
      </Service>
    </Server> 
    

    The server.xml file for many tc Runtime instances already contains a commented-out <Cluster>; in which case, simply remove the comment tags.

    You can also add the <Cluster> element to the <Host> element of the server.xml file, thus enabling clustering in all virtual hosts of the tc Runtime instance. When you add the <Cluster> element inside the <Engine> element, the cluster appends the host name of each session manager to the manager's name so that two contexts that have the same name but are part of two different hosts are distinguishable.

  2. If you will run more than one tc Runtime instance on the same computer, be sure the various TCP/IP listen ports for each tc Runtime instance are unique. You configure the listen ports using the port and redirectPort attributes of the <Connector> element in the server.xml file. See Simple tc Runtime Configuration.

  3. If you will run more than one tc Runtime instance on the same computer, and you are using Hyperic HQ to monitor and configure the cluster and its individual members, be sure the JMX listen ports for each tc Runtime instance are unique. You configure the JMX listen port using the port attribute of the <Listener classname="com.springsource.tcserver. serviceability.rmi.JmxSocketListener"> element in the server.xml file. See Simple tc Runtime Configuration.

  4. If the cluster is hosted on more than one computer, time-synchronize the computers with the Network Time Protocol (NTP). See The Network Time Protocol.

The cluster that results from the preceding procedure has the following configuration:

For additional detailed information about tc Runtime clusters and a description of the default cluster configuration, see Clustering /Session Replication HOW-TO.