Running Clustered Tomcat Applications

You can configure Silver Fabric to run with multiple Tomcat Partitions (clusters). In this configuration, engines running a Tomcat J2EE component act as nodes in a cluster. Membership in a particular cluster is determined by a node’s CLUSTER_MCAST_ADDR and CLUSTER_MCAST_PORT. The cluster name provided while creating a component using the Component Wizard is provided as a system property to the Tomcat process and is the name used in the cluster.xml file. Naming is a convenience to the administrator, but does not determine cluster membership.

Attention: When running multiple clustered Tomcat components concurrently, configure each component with a unique cluster name, and a unique multicast address and port. To change the multicast port and address, you can set the CLUSTER_MCAST_ADDR and CLUSTER_MCAST_PORT runtime context variables on the Add/Edit Enabler and Component-specific Runtime Context Variables page in the Component Wizard. See Tomcat Runtime Context Variables for the default values of these variables.

Procedure

  1. Start Silver Fabric and log into the Silver Fabric Administration Tool.
  2. Go to Stacks > Components.
  3. Select Create New J2EE Component from the Global Actions list.
  4. If prompted, select the Tomcat enabler and desired enabler version from the available enablers.
  5. Enter a component name.
  6. Click Next.
    The Configure Component features screen is displayed.
  7. Select the Clustering support option from the Add feature list. The Enter feature values screen is displayed.
  8. Enter the cluster name in the field and click OK.
  9. Click Next again.
    The Configure Component options screen is displayed.
  10. Select the desired options.
  11. Click Next until you reach the Add/Edit Archive Files screen.
  12. Click Add and upload the archives (WAR file only) that you want to deploy and run on the Tomcat server cluster.
  13. Configure the options on the remaining screens as needed. Additional options are also configurable through context variables.
  14. Click Finish.
  15. Select Publish Component from the Actions list to deploy the component.