geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Geronimo v2.2 > Tomcat Native Clustering
Date Tue, 15 Sep 2009 07:18:00 GMT
<html>
<head>
    <base href="http://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=GMOxDOC22&amp;forWysiwyg=true" type="text/css">
    </head>
<body style="background-color: white" bgcolor="white">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
     <h2><a href="http://cwiki.apache.org/confluence/display/GMOxDOC22/Tomcat+Native+Clustering">Tomcat Native Clustering</a></h2>
     <h4>Page <b>edited</b> by             <a href="http://cwiki.apache.org/confluence/display/~chirunhua@gmail.com">Runhua Chi</a>
    </h4>
     Update the configuration of session affinity 
          <div id="versionComment" class="noteMacro" style="display:none; padding: 5px;">
     Update the configuration of session affinity <br />
     </div>
          <br/>
     <div class="notificationGreySide">
         <style type='text/css'>/*<![CDATA[*/
table.ScrollbarTable  {border: none;padding: 3px;width: 100%;padding: 3px;margin: 0px;background-color: #f0f0f0}
table.ScrollbarTable td.ScrollbarPrevIcon {text-align: center;width: 16px;border: none;}
table.ScrollbarTable td.ScrollbarPrevName {text-align: left;border: none;}
table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
table.ScrollbarTable td.ScrollbarNextName {text-align: right;border: none;}
table.ScrollbarTable td.ScrollbarNextIcon {text-align: center;width: 16px;border: none;}

/*]]>*/</style><div class="Scrollbar"><table class='ScrollbarTable'><tr><td class='ScrollbarPrevIcon'><a href="/confluence/display/GMOxDOC22/Plugin+based+Farming"><img border='0' align='middle' src='/confluence/images/icons/back_16.gif' width='16' height='16'></a></td><td width='33%' class='ScrollbarPrevName'><a href="/confluence/display/GMOxDOC22/Plugin+based+Farming">Plugin based Farming</a>&nbsp;</td><td width='33%' class='ScrollbarParent'><sup><a href="/confluence/display/GMOxDOC22/Clustering+and+farming"><img border='0' align='middle' src='/confluence/images/icons/up_16.gif' width='8' height='8'></a></sup><a href="/confluence/display/GMOxDOC22/Clustering+and+farming">Clustering and farming</a></td><td width='33%' class='ScrollbarNextName'>&nbsp;<a href="/confluence/display/GMOxDOC22/WADI+Clustering">WADI Clustering</a></td><td class='ScrollbarNextIcon'><a href="/confluence/display/GMOxDOC22/WADI+Clustering"><img border='0' align='middle' src='/confluence/images/icons/forwd_16.gif' width='16' height='16'></a></td></tr></table></div>

<p>The tomcat web container provides a native clustering solution that can be configured through geronimo using gbean definitions within config.xml.  This document will go through the available gbeans and how to configure them for clustering in a geronimo server with a tomcat web container.  Details about each component of the cluster and configuration options can be found in the tomcat documentation here <a href="http://tomcat.apache.org/tomcat-6.0-doc/config/cluster.html" rel="nofollow">http://tomcat.apache.org/tomcat-6.0-doc/config/cluster.html</a></p>

<div>
<ul>
    <li><a href='#TomcatNativeClustering-ClusterConfigurationElements'>Cluster Configuration Elements</a></li>
    <li><a href='#TomcatNativeClustering-SampleClusteringConfigurationwithmulticastconfiguration'>Sample Clustering Configuration with multicast configuration</a></li>
<ul>
    <li><a href='#TomcatNativeClustering-Settingupaclusteringenvironment'>Setting up a clustering environment</a></li>
<ul>
    <li><a href='#TomcatNativeClustering-Planningyourcluster'>Planning your cluster</a></li>
    <li><a href='#TomcatNativeClustering-PreparingyourWebapplication'>Preparing your Web application</a></li>
    <li><a href='#TomcatNativeClustering-Enablingsessionaffinity'>Enabling session affinity</a></li>
    <li><a href='#TomcatNativeClustering-Engagingloadbalancingandfailover'>Engaging load balancing and failover</a></li>
</ul>
    <li><a href='#TomcatNativeClustering-Deployingyourapplicationtoacluster'>Deploying your application to a cluster</a></li>
<ul>
    <li><a href='#TomcatNativeClustering-Usingasingledeploymentplan'>Using a single deployment plan</a></li>
    <li><a href='#TomcatNativeClustering-Usingseparatedeploymentplans'>Using separate deployment plans</a></li>
    <li><a href='#TomcatNativeClustering-BuildingaTomcatclusteringdeploymentplan'>Building a Tomcat clustering deployment plan</a></li>
    <li><a href='#TomcatNativeClustering-DeployingyourWebapplicationtothecluster'>Deploying your Web application to the cluster</a></li>
</ul>
</ul>
    <li><a href='#TomcatNativeClustering-SampleTomcatClusteringwithUnicastConfiguration'>Sample Tomcat Clustering with Unicast Configuration</a></li>
</ul></div>

<h1><a name="TomcatNativeClustering-ClusterConfigurationElements"></a>Cluster Configuration Elements</h1>

<ul>
	<li>Cluster
	<ul>
		<li>ClusterListenerChain</li>
		<li>TomcatValveChain</li>
		<li>Channel
		<ul>
			<li>Membership</li>
			<li>Receiver</li>
			<li>Sender</li>
			<li>ChannelInterceptor
			<ul>
				<li>StaticMember</li>
			</ul>
			</li>
		</ul>
		</li>
		<li>ClusterManager</li>
	</ul>
	</li>
</ul>


<h1><a name="TomcatNativeClustering-SampleClusteringConfigurationwithmulticastconfiguration"></a>Sample Clustering Configuration with multicast configuration</h1>

<p>Although sufficient for many applications, Tomcat clusters have some limitations.</p>
<ul>
	<li>This feature does not replicate stateful session Enterprise JavaBeans (EJBs). You will have to avoid stateful session EJBs in your distributed applications.</li>
	<li>This feature does not replicate dynamic updates to the Java Naming and Directory Interface (JNDI). You will have to configure all the JNDI names used by your distributed applications in every node of the cluster.</li>
	<li>This feature does not replicate distributable Web applications to other nodes in the cluster. You will have to deploy your distributable Web applications to every node.</li>
</ul>


<p>A cluster configuration should be considered when you want to improve the scalability and availability of your Web application. The following sections provide detailed instructions on how to set up your cluster nodes and how to deploy your applications with tomcat clustering enabled.</p>
<ul>
	<li><a href="#TomcatNativeClustering-Settingupaclusteringenvironment">Setting up a clustering environment</a>
	<ul>
		<li><a href="#TomcatNativeClustering-Planningyourcluster">Planning your cluster</a></li>
		<li><a href="#TomcatNativeClustering-PreparingyourWebapplication">Preparing your Web application</a></li>
		<li><a href="#TomcatNativeClustering-Enablingsessionaffinity">Enabling session affinity</a></li>
		<li><a href="#TomcatNativeClustering-Engagingloadbalancingandfailover">Engaging load balancing and failover</a></li>
	</ul>
	</li>
	<li><a href="#TomcatNativeClustering-Deployingyourapplicationtoacluster">Deploying your application to a cluster</a>
	<ul>
		<li><a href="#TomcatNativeClustering-Usingasingledeploymentplan">Using a single deployment plan</a></li>
		<li><a href="#TomcatNativeClustering-Usingseparatedeploymentplans">Using separate deployment plans</a></li>
	</ul>
	</li>
</ul>


<h2><a name="TomcatNativeClustering-Settingupaclusteringenvironment"></a>Setting up a clustering environment</h2>
<p>Generally, to set up a small cluster you will need at least 2 nodes and 1 HTTP server.  The HTTP server is used to serve requests from clients and ensure well-balanced traffic load among different nodes. Similarly, each node is configured to use the same logical Tomcat engine and enable session affinity.</p>
<h3><a name="TomcatNativeClustering-Planningyourcluster"></a>Planning your cluster</h3>

<p>The Tomcat cluster replicates HTTP session data via memory to memory multicast communication.</p>

<p>Every node transmits its session data to every node in the cluster. This algorithm is only efficient when the clusters are small. If the clusters grow too large, the overhead in storage utilization and network traffic becomes excessive. To avoid excessive overhead, consider dividing your nodes into several smaller clusters.</p>

<p>HTTP session data is replicated among the nodes in the cluster using a multicast broadcast. All nodes in the cluster must be on the same physical subnet and multicast broadcast must be supported by that subnet.</p>

<h3><a name="TomcatNativeClustering-PreparingyourWebapplication"></a>Preparing your Web application</h3>

<p>To participate in a cluster configuration, your Web application must be implemented correctly.</p>
<ul>
	<li>Ensure that every object placed in the HTTP session implements java.io.Serializable. The clustering feature serializes the objects when it distributes them to the other nodes in the cluster.</li>
	<li>The deployment descriptor for your Web application, that is the <tt>web.xml</tt> file in the Web archive, must indicate that your Web application is distributable. To do this, insert the <b>distributable</b> element in the deployment descriptor.
<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>Excerpt from web.xml</b></div><div class="codeContent panelContent">
<pre class="code-xml">
<span class="code-tag">&lt;?xml version=<span class="code-quote">"1.0"</span> encoding=<span class="code-quote">"ISO-8859-1"</span>?&gt;</span>
&lt;!DOCTYPE web-app
    PUBLIC <span class="code-quote">"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"</span>
    <span class="code-quote">"http://java.sun.com/dtd/web-app_2_3.dtd"</span>&gt;

<span class="code-tag">&lt;web-app&gt;</span>
    <span class="code-tag">&lt;display-name&gt;</span> ... <span class="code-tag">&lt;/display-name&gt;</span>
    <span class="code-tag">&lt;description&gt;</span> ... <span class="code-tag">&lt;/description&gt;</span>
    <span class="code-tag">&lt;distributable&gt;</span> <span class="code-tag">&lt;distributable/&gt;</span>
    .
    .
    .
<span class="code-tag">&lt;/web-app&gt;</span>
</pre>
</div></div></li>
	<li>Do not use stateful session Enterprise JavaBeans (EJBs). The clustering feature does not replicate stateful EJBs among the nodes in the cluster.</li>
	<li>If your Web application uses a database, make sure the database can be accessed from every node in the cluster. Ensure that the proper JDBC drivers are installed on every node and that the datasource objects are defined correctly on every node.</li>
	<li>Do not depend on dynamic updates to the Java Naming and Directory Interface (JNDI). You will need to configure all the JNDI names used by your application in every node of the cluster. The clustering feature does not replicate JNDI changes among the nodes in the cluster.</li>
</ul>


<h3><a name="TomcatNativeClustering-Enablingsessionaffinity"></a>Enabling session affinity</h3>

<p>Support for <em>session affinity</em>, also known as <em>sticky session</em> support, allows a load balancing service to route an HTTP request back to the same node that created the HTTP session associated with that request until that node fails. You must use session affinity if you configure an asynchronous type of session replication. With asynchronous replication, the reply is returned before the HTTP session is replicated so there is always a chance that the next request using that session arrives before the replication is complete. In this case, the only way to ensure that the request is processed using the correct session data is to route the request to the node that sent the reply to the last request and originated the replication.</p>

<p>In Geronimo v2.2, users can have the same experiences as in Tomcat Web container to configure session affinity. To enable session affinity, you must modify <tt>servel.xml</tt> under <tt>&lt;GERONIMO_HOME&gt;/var/catalina</tt> dirctory and configure the <b>&lt;Engine&gt;</b> with a <b>jvmRoute</b> attribute value that is unique for each node in the cluster. The load balancer will return this value in the session cookie or the encoded URL returned to the browser. When a related request arrives it can use the value to route the request to the correct node. See </p>

<ol>
	<li>For every node in the cluster, update <tt>server.xml</tt> as followed after the server is stopped:
<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>Excerpt from server.xml</b></div><div class="codeContent panelContent">
<pre class="code-xml">
 ...
 <span class="code-tag">&lt;Engine name=<span class="code-quote">"Catalina"</span> defaultHost=<span class="code-quote">"${ServerHostname}"</span> jvmRoute=<span class="code-quote">"nodeId"</span>&gt;</span>
 ...
</pre>
</div></div>
<p>where</p>
	<ul>
		<li><em>nodeId</em> is a node identifier that is unique among all the nodes in the cluster. If you are using mod_jk, make sure that the jvmRoute attribute value matches your worker name in <tt>workers.properties</tt>.</li>
	</ul>
	</li>
	<li>Restart the server to enable the new configuration.</li>
</ol>


<h3><a name="TomcatNativeClustering-Engagingloadbalancingandfailover"></a>Engaging load balancing and failover</h3>

<p>Initially, the server configuration includes an <em>AJP connector</em> suitable for exchanging messages with a load balancing service. See <a href="/confluence/display/GMOxDOC22/Configuring+a+remote+Apache+HTTP+server" title="Configuring a remote Apache HTTP server">Configuring a remote Apache HTTP server</a> for more information about the HTTP server configuration.</p>


<h2><a name="TomcatNativeClustering-Deployingyourapplicationtoacluster"></a>Deploying your application to a cluster</h2>
<p>To deploy your application to a cluster and make sure HTTP sessions are replicated successfully, cluster configuration elements of Tomcat Web containers must be configured using gbean definitions within deployment plans. You can either enclose all of configuration elements within one <tt>geronimo-web.xml</tt> and deploy the application to default Tomcat Web container with the file, or use one plan to initiate a new Tomcat cluster module by passing through configuration elements, and another plan for your application to bind with the new module.</p>

<h3><a name="TomcatNativeClustering-Usingasingledeploymentplan"></a>Using a single deployment plan</h3>
<p>If you want to deploy your Web application to a cluster, install your WAR files to the appropriate cluster member, assuring that you use the correct deployment plan for each member. Here is the template for your Web application deployment plan. See <a href="/confluence/display/GMOxDOC22/Creating+deployment+plans+for+Web+applications" title="Creating deployment plans for Web applications">Creating deployment plans for Web applications</a> for more information about the parameters.</p>
<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>Excerpt from web.xml or application.xml</b></div><div class="codeContent panelContent">
<pre class="code-xml">
<span class="code-tag">&lt;?xml version=<span class="code-quote">"1.0"</span> encoding=<span class="code-quote">"UTF-8"</span>?&gt;</span>
&lt;web-app xmlns=<span class="code-quote">"http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-2.0.1"</span>
         <span class="code-keyword">xmlns:dep</span>=<span class="code-quote">"http://geronimo.apache.org/xml/ns/deployment-1.2"</span>&gt;

    <span class="code-tag">&lt;dep:environment&gt;</span>
        <span class="code-tag">&lt;dep:moduleId&gt;</span>
        <span class="code-tag">&lt;dep:groupId&gt;</span>Geronimo-samples<span class="code-tag">&lt;/dep:groupId&gt;</span>
        <span class="code-tag">&lt;dep:artifactId&gt;</span>web-cluster-server1<span class="code-tag">&lt;/dep:artifactId&gt;</span>
        <span class="code-tag">&lt;dep:version&gt;</span>2.1.1.2<span class="code-tag">&lt;/dep:version&gt;</span>
        <span class="code-tag">&lt;dep:type&gt;</span>war<span class="code-tag">&lt;/dep:type&gt;</span>
        <span class="code-tag">&lt;/dep:moduleId&gt;</span>
        <span class="code-tag">&lt;dep:dependencies/&gt;</span>
        <span class="code-tag">&lt;dep:hidden-classes/&gt;</span>
        <span class="code-tag">&lt;dep:non-overridable-classes/&gt;</span>
        <span class="code-tag">&lt;dep:dependencies&gt;</span>
          <span class="code-tag">&lt;dep:dependency&gt;</span>
            <span class="code-tag">&lt;dep:groupId&gt;</span>console.realm<span class="code-tag">&lt;/dep:groupId&gt;</span>
            <span class="code-tag">&lt;dep:artifactId&gt;</span>geronimo-properties-realm<span class="code-tag">&lt;/dep:artifactId&gt;</span>
            <span class="code-tag">&lt;dep:version&gt;</span>1.0<span class="code-tag">&lt;/dep:version&gt;</span>
            <span class="code-tag">&lt;dep:type&gt;</span>car<span class="code-tag">&lt;/dep:type&gt;</span>
          <span class="code-tag">&lt;/dep:dependency&gt;</span>
        <span class="code-tag">&lt;/dep:dependencies&gt;</span>
    <span class="code-tag">&lt;/dep:environment&gt;</span>

    <span class="code-tag">&lt;context-root&gt;</span>/servlet-examples-cluster<span class="code-tag">&lt;/context-root&gt;</span>

    <span class="code-tag">&lt;security-realm-name&gt;</span>geronimo-properties-realm<span class="code-tag">&lt;/security-realm-name&gt;</span>
    <span class="code-tag">&lt;security&gt;</span>
        <span class="code-tag">&lt;default-principal&gt;</span>
        <span class="code-tag">&lt;principal name=<span class="code-quote">"anonymous"</span> class=<span class="code-quote">"org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal"</span>/&gt;</span>
      <span class="code-tag">&lt;/default-principal&gt;</span>
      <span class="code-tag">&lt;role-mappings&gt;</span>
        <span class="code-tag">&lt;role role-name=<span class="code-quote">"tomcat"</span>&gt;</span>
          <span class="code-tag">&lt;principal name=<span class="code-quote">"admin"</span> class=<span class="code-quote">"org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"</span>/&gt;</span>
        <span class="code-tag">&lt;/role&gt;</span>
      <span class="code-tag">&lt;/role-mappings&gt;</span>
    <span class="code-tag">&lt;/security&gt;</span>

    <span class="code-tag">&lt;cluster&gt;</span>TomcatCluster<span class="code-tag">&lt;/cluster&gt;</span>
    <span class="code-tag">&lt;gbean class=<span class="code-quote">"org.apache.geronimo.tomcat.cluster.CatalinaClusterGBean"</span> name=<span class="code-quote">"TomcatCluster"</span>&gt;</span>
        <span class="code-tag">&lt;attribute name=<span class="code-quote">"className"</span>&gt;</span>org.apache.catalina.ha.tcp.SimpleTcpCluster<span class="code-tag">&lt;/attribute&gt;</span>
        <span class="code-tag">&lt;attribute name=<span class="code-quote">"initParams"</span>&gt;</span>
            managerClassName=org.apache.catalina.ha.session.DeltaManager
            expireSessionsOnShutdown=false
            useDirtyFlag=true
            notifyListenersOnReplication=true
        <span class="code-tag">&lt;/attribute&gt;</span>
        <span class="code-tag">&lt;reference name=<span class="code-quote">"TomcatValveChain"</span>&gt;</span>
            <span class="code-tag">&lt;name&gt;</span>ReplicationValve<span class="code-tag">&lt;/name&gt;</span>
        <span class="code-tag">&lt;/reference&gt;</span>
        <span class="code-tag">&lt;reference name=<span class="code-quote">"ClusterListenerChain"</span>&gt;</span>
            <span class="code-tag">&lt;name&gt;</span>ClusterSessionListener<span class="code-tag">&lt;/name&gt;</span>
        <span class="code-tag">&lt;/reference&gt;</span>
        <span class="code-tag">&lt;reference name=<span class="code-quote">"Channel"</span>&gt;</span>
            <span class="code-tag">&lt;name&gt;</span>TomcatGroupChannel<span class="code-tag">&lt;/name&gt;</span>
        <span class="code-tag">&lt;/reference&gt;</span>
    <span class="code-tag">&lt;/gbean&gt;</span>
    <span class="code-tag">&lt;gbean class=<span class="code-quote">"org.apache.geronimo.tomcat.cluster.ChannelGBean"</span> name=<span class="code-quote">"TomcatGroupChannel"</span>&gt;</span>
        <span class="code-tag">&lt;attribute name=<span class="code-quote">"className"</span>&gt;</span>org.apache.catalina.tribes.group.GroupChannel<span class="code-tag">&lt;/attribute&gt;</span>
        <span class="code-tag">&lt;attribute name=<span class="code-quote">"initParams"</span>/&gt;</span>
        <span class="code-tag">&lt;reference name=<span class="code-quote">"Membership"</span>&gt;</span>
            <span class="code-tag">&lt;name&gt;</span>TomcatMembership<span class="code-tag">&lt;/name&gt;</span>
        <span class="code-tag">&lt;/reference&gt;</span>
        <span class="code-tag">&lt;reference name=<span class="code-quote">"Receiver"</span>&gt;</span>
            <span class="code-tag">&lt;name&gt;</span>TomcatReceiver<span class="code-tag">&lt;/name&gt;</span>
        <span class="code-tag">&lt;/reference&gt;</span>
        <span class="code-tag">&lt;reference name=<span class="code-quote">"Sender"</span>&gt;</span>
            <span class="code-tag">&lt;name&gt;</span>TomcatSender<span class="code-tag">&lt;/name&gt;</span>
        <span class="code-tag">&lt;/reference&gt;</span>
        <span class="code-tag">&lt;reference name=<span class="code-quote">"ChannelInterceptor"</span>&gt;</span>
            <span class="code-tag">&lt;name&gt;</span>TomcatChannelInterceptor<span class="code-tag">&lt;/name&gt;</span>
        <span class="code-tag">&lt;/reference&gt;</span>
    <span class="code-tag">&lt;/gbean&gt;</span>
    <span class="code-tag">&lt;gbean class=<span class="code-quote">"org.apache.geronimo.tomcat.cluster.MembershipServiceGBean"</span> name=<span class="code-quote">"TomcatMembership"</span>&gt;</span>
        <span class="code-tag">&lt;attribute name=<span class="code-quote">"className"</span>&gt;</span>org.apache.catalina.tribes.membership.McastService<span class="code-tag">&lt;/attribute&gt;</span>
        <span class="code-tag">&lt;attribute name=<span class="code-quote">"initParams"</span>&gt;</span>
            mcastAddr=228.0.0.4
            mcastPort=45564
            mcastFrequency=500
            mcastDropTime=3000
        <span class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;/gbean&gt;</span>
    <span class="code-tag">&lt;gbean class=<span class="code-quote">"org.apache.geronimo.tomcat.cluster.ReceiverGBean"</span> name=<span class="code-quote">"TomcatReceiver"</span>&gt;</span>
        <span class="code-tag">&lt;attribute name=<span class="code-quote">"className"</span>&gt;</span>org.apache.catalina.tribes.transport.nio.NioReceiver<span class="code-tag">&lt;/attribute&gt;</span>
        <span class="code-tag">&lt;attribute name=<span class="code-quote">"initParams"</span>&gt;</span>
            tcpListenAddress=IPAddressIn
            tcpListenPort=4001
            tcpSelectorTimeout=100
            tcpThreadCount=6
        <span class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;/gbean&gt;</span>
    <span class="code-tag">&lt;gbean class=<span class="code-quote">"org.apache.geronimo.tomcat.cluster.SenderGBean"</span> name=<span class="code-quote">"TomcatSender"</span>&gt;</span>
        <span class="code-tag">&lt;attribute name=<span class="code-quote">"className"</span>&gt;</span>org.apache.catalina.tribes.transport.ReplicationTransmitter<span class="code-tag">&lt;/attribute&gt;</span>
        <span class="code-tag">&lt;attribute name=<span class="code-quote">"initParams"</span>&gt;</span>
            replicationMode=pooled
            waitForAck=true
        <span class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;/gbean&gt;</span>
    <span class="code-tag">&lt;gbean class=<span class="code-quote">"org.apache.geronimo.tomcat.ValveGBean"</span> name=<span class="code-quote">"ReplicationValve"</span>&gt;</span>
        <span class="code-tag">&lt;attribute name=<span class="code-quote">"className"</span>&gt;</span>org.apache.catalina.ha.tcp.ReplicationValve<span class="code-tag">&lt;/attribute&gt;</span>
        <span class="code-tag">&lt;attribute name=<span class="code-quote">"initParams"</span>&gt;</span>filter=.*\.gif;.*\.js;.*\.css;.*\.png;.*\.jpeg;.*\.jpg;.*\.htm;.*\.html;.*\.txt;<span class="code-tag">&lt;/attribute&gt;</span>
        <span class="code-tag">&lt;reference name=<span class="code-quote">"NextValve"</span>&gt;</span>
            <span class="code-tag">&lt;type&gt;</span>TomcatValve<span class="code-tag">&lt;/type&gt;</span>
            <span class="code-tag">&lt;name&gt;</span>JvmRouteBinderValve<span class="code-tag">&lt;/name&gt;</span>
        <span class="code-tag">&lt;/reference&gt;</span>
    <span class="code-tag">&lt;/gbean&gt;</span>
    <span class="code-tag">&lt;gbean class=<span class="code-quote">"org.apache.geronimo.tomcat.ValveGBean"</span> name=<span class="code-quote">"JvmRouteBinderValve"</span>&gt;</span>
        <span class="code-tag">&lt;attribute name=<span class="code-quote">"className"</span>&gt;</span>org.apache.catalina.ha.session.JvmRouteBinderValve<span class="code-tag">&lt;/attribute&gt;</span>
        <span class="code-tag">&lt;attribute name=<span class="code-quote">"initParams"</span>&gt;</span>enabled=true<span class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;/gbean&gt;</span>
    <span class="code-tag">&lt;gbean class=<span class="code-quote">"org.apache.geronimo.tomcat.cluster.ClusterListenerGBean"</span> name=<span class="code-quote">"ClusterSessionListener"</span>&gt;</span>
        <span class="code-tag">&lt;attribute name=<span class="code-quote">"className"</span>&gt;</span>org.apache.catalina.ha.session.ClusterSessionListener<span class="code-tag">&lt;/attribute&gt;</span>
        <span class="code-tag">&lt;reference name=<span class="code-quote">"NextListener"</span>&gt;</span>
            <span class="code-tag">&lt;name&gt;</span>JvmRouteSessionIDBinderListener<span class="code-tag">&lt;/name&gt;</span>
        <span class="code-tag">&lt;/reference&gt;</span>
    <span class="code-tag">&lt;/gbean&gt;</span>
    <span class="code-tag">&lt;gbean class=<span class="code-quote">"org.apache.geronimo.tomcat.cluster.ClusterListenerGBean"</span> name=<span class="code-quote">"JvmRouteSessionIDBinderListener"</span>&gt;</span>
        <span class="code-tag">&lt;attribute name=<span class="code-quote">"className"</span>&gt;</span>org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener<span class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;/gbean&gt;</span>
    <span class="code-tag">&lt;gbean class=<span class="code-quote">"org.apache.geronimo.tomcat.cluster.ChannelInterceptorGBean"</span> name=<span class="code-quote">"TomcatChannelInterceptor"</span>&gt;</span>
        <span class="code-tag">&lt;attribute name=<span class="code-quote">"className"</span>&gt;</span>org.apache.catalina.tribes.group.interceptors.TcpFailureDetector<span class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;/gbean&gt;</span>
<span class="code-tag">&lt;/web-app&gt;</span>
</pre>
</div></div>
<p>where </p>
<ul>
	<li><em>web-cluster-server1</em> should match the WAR file name. It can be different for each node in the cluster.</li>
	<li><em>IPAddressIn</em> is the host name or IP address where the node listens for TCP connections that carry session replication messages.</li>
</ul>


<p>On each node, deploy your Web application, either via admin console or <b>deploy</b> command, following this syntax:</p>
<div class="panel" style="border-style: solid;border-width: 1px;"><div class="panelContent">
<p><tt>deploy --user <em>name</em> --password <em>word</em> deploy <em>archive</em> <em>plan</em></tt></p>
</div></div>
<p>where </p>
<ul>
	<li><em>name</em> is replaced with a user name authorized to manage the server. If you omit this option, you will be prompted to enter a user name.</li>
	<li><em>word</em> is replaced with the password used to authenticate the user. If you omit this option, you will be prompted to enter a password.</li>
	<li><em>archive</em> is replaced with a file specification to your Web application WAR file.</li>
	<li><em>plan</em> is replaced with a file specification to your deployment plan.</li>
</ul>


<p>Note: After installation, the user name is initially <b>system</b>, and the password initially <b>manager</b>.</p>

<h3><a name="TomcatNativeClustering-Usingseparatedeploymentplans"></a>Using separate deployment plans</h3>
<p>If you are developing a Web application and want to test in a Tomcat cluster, consider deploying the Tomcat cluster feature by adding the services to the deployment plan for your application. Most often, you will want to deploy the Tomcat clustering feature as a system module so that any Web application can be deployed to run in a cluster.</p>

<h3><a name="TomcatNativeClustering-BuildingaTomcatclusteringdeploymentplan"></a>Building a Tomcat clustering deployment plan</h3>
<p>If you want to deploy the Tomcat clustering feature, build a deployment plan using the following template. You may need a deployment plan for each node in the cluster.</p>
<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>Excerpt from cluster_Enable_plan.xml</b></div><div class="codeContent panelContent">
<pre class="code-xml">
<span class="code-tag">&lt;?xml version=<span class="code-quote">"1.0"</span> encoding=<span class="code-quote">"UTF-8"</span>?&gt;</span>
<span class="code-tag">&lt;?xml version=<span class="code-quote">"1.0"</span> encoding=<span class="code-quote">"UTF-8"</span>?&gt;</span>
<span class="code-tag">&lt;module xmlns=<span class="code-quote">"http://geronimo.apache.org/xml/ns/deployment-1.2"</span>&gt;</span>
  <span class="code-tag">&lt;environment&gt;</span>
    <span class="code-tag">&lt;moduleId&gt;</span>
      <span class="code-tag">&lt;groupId&gt;</span>Modulegroup<span class="code-tag">&lt;/groupId&gt;</span>
      <span class="code-tag">&lt;artifactId&gt;</span>ModuleId<span class="code-tag">&lt;/artifactId&gt;</span>
      <span class="code-tag">&lt;version&gt;</span>ModuleVersion<span class="code-tag">&lt;/version&gt;</span>
      <span class="code-tag">&lt;type&gt;</span>car<span class="code-tag">&lt;/type&gt;</span>
    <span class="code-tag">&lt;/moduleId&gt;</span>
   <span class="code-tag">&lt;dependencies&gt;</span>
	 <span class="code-tag">&lt;dependency&gt;</span>
      <span class="code-tag">&lt;groupId&gt;</span>org.apache.geronimo.configs<span class="code-tag">&lt;/groupId&gt;</span>
      <span class="code-tag">&lt;artifactId&gt;</span>tomcat6<span class="code-tag">&lt;/artifactId&gt;</span>
      <span class="code-tag">&lt;version&gt;</span>2.1.4<span class="code-tag">&lt;/version&gt;</span>
    <span class="code-tag">&lt;/dependency&gt;</span>
      <span class="code-tag">&lt;dependency&gt;</span>
        <span class="code-tag">&lt;groupId&gt;</span>org.apache.geronimo.configs<span class="code-tag">&lt;/groupId&gt;</span>
        <span class="code-tag">&lt;artifactId&gt;</span>j2ee-server<span class="code-tag">&lt;/artifactId&gt;</span>
        <span class="code-tag">&lt;version&gt;</span>2.1.4<span class="code-tag">&lt;/version&gt;</span>
        <span class="code-tag">&lt;type&gt;</span>car<span class="code-tag">&lt;/type&gt;</span>
      <span class="code-tag">&lt;/dependency&gt;</span>
      <span class="code-tag">&lt;dependency&gt;</span>
        <span class="code-tag">&lt;groupId&gt;</span>org.apache.geronimo.framework<span class="code-tag">&lt;/groupId&gt;</span>
        <span class="code-tag">&lt;artifactId&gt;</span>server-security-config<span class="code-tag">&lt;/artifactId&gt;</span>
        <span class="code-tag">&lt;version&gt;</span>2.1.4<span class="code-tag">&lt;/version&gt;</span>
        <span class="code-tag">&lt;type&gt;</span>car<span class="code-tag">&lt;/type&gt;</span>
      <span class="code-tag">&lt;/dependency&gt;</span>
      <span class="code-tag">&lt;dependency&gt;</span>
        <span class="code-tag">&lt;groupId&gt;</span>org.apache.geronimo.configs<span class="code-tag">&lt;/groupId&gt;</span>
        <span class="code-tag">&lt;artifactId&gt;</span>transaction<span class="code-tag">&lt;/artifactId&gt;</span>
        <span class="code-tag">&lt;version&gt;</span>2.1.4<span class="code-tag">&lt;/version&gt;</span>
        <span class="code-tag">&lt;type&gt;</span>car<span class="code-tag">&lt;/type&gt;</span>
      <span class="code-tag">&lt;/dependency&gt;</span>
      <span class="code-tag">&lt;dependency&gt;</span>
        <span class="code-tag">&lt;groupId&gt;</span>org.apache.geronimo.modules<span class="code-tag">&lt;/groupId&gt;</span>
        <span class="code-tag">&lt;artifactId&gt;</span>geronimo-tomcat6<span class="code-tag">&lt;/artifactId&gt;</span>
        <span class="code-tag">&lt;version&gt;</span>2.1.4<span class="code-tag">&lt;/version&gt;</span>
        <span class="code-tag">&lt;type&gt;</span>jar<span class="code-tag">&lt;/type&gt;</span>
      <span class="code-tag">&lt;/dependency&gt;</span>
      <span class="code-tag">&lt;dependency&gt;</span>
        <span class="code-tag">&lt;groupId&gt;</span>org.apache.geronimo.configs<span class="code-tag">&lt;/groupId&gt;</span>
        <span class="code-tag">&lt;artifactId&gt;</span>jasper<span class="code-tag">&lt;/artifactId&gt;</span>
        <span class="code-tag">&lt;version&gt;</span>2.1.4<span class="code-tag">&lt;/version&gt;</span>
        <span class="code-tag">&lt;type&gt;</span>car<span class="code-tag">&lt;/type&gt;</span>
      <span class="code-tag">&lt;/dependency&gt;</span>
      <span class="code-tag">&lt;dependency&gt;</span>
        <span class="code-tag">&lt;groupId&gt;</span>org.apache.geronimo.configs<span class="code-tag">&lt;/groupId&gt;</span>
        <span class="code-tag">&lt;artifactId&gt;</span>webservices-common<span class="code-tag">&lt;/artifactId&gt;</span>
        <span class="code-tag">&lt;version&gt;</span>2.1.4<span class="code-tag">&lt;/version&gt;</span>
        <span class="code-tag">&lt;type&gt;</span>car<span class="code-tag">&lt;/type&gt;</span>
      <span class="code-tag">&lt;/dependency&gt;</span>
      <span class="code-tag">&lt;dependency&gt;</span>
        <span class="code-tag">&lt;groupId&gt;</span>org.apache.tomcat<span class="code-tag">&lt;/groupId&gt;</span>
        <span class="code-tag">&lt;artifactId&gt;</span>catalina<span class="code-tag">&lt;/artifactId&gt;</span>
        <span class="code-tag">&lt;version&gt;</span>6.0.18-G678601<span class="code-tag">&lt;/version&gt;</span>
        <span class="code-tag">&lt;type&gt;</span>jar<span class="code-tag">&lt;/type&gt;</span>
      <span class="code-tag">&lt;/dependency&gt;</span>
      <span class="code-tag">&lt;dependency&gt;</span>
        <span class="code-tag">&lt;groupId&gt;</span>org.apache.tomcat<span class="code-tag">&lt;/groupId&gt;</span>
        <span class="code-tag">&lt;artifactId&gt;</span>catalina-ha<span class="code-tag">&lt;/artifactId&gt;</span>
        <span class="code-tag">&lt;version&gt;</span>6.0.18<span class="code-tag">&lt;/version&gt;</span>
        <span class="code-tag">&lt;type&gt;</span>jar<span class="code-tag">&lt;/type&gt;</span>
      <span class="code-tag">&lt;/dependency&gt;</span>
      <span class="code-tag">&lt;dependency&gt;</span>
        <span class="code-tag">&lt;groupId&gt;</span>org.apache.tomcat<span class="code-tag">&lt;/groupId&gt;</span>
        <span class="code-tag">&lt;artifactId&gt;</span>tribes<span class="code-tag">&lt;/artifactId&gt;</span>
        <span class="code-tag">&lt;version&gt;</span>6.0.18<span class="code-tag">&lt;/version&gt;</span>
        <span class="code-tag">&lt;type&gt;</span>jar<span class="code-tag">&lt;/type&gt;</span>
      <span class="code-tag">&lt;/dependency&gt;</span>
      <span class="code-tag">&lt;dependency&gt;</span>
        <span class="code-tag">&lt;groupId&gt;</span>org.apache.tomcat<span class="code-tag">&lt;/groupId&gt;</span>
        <span class="code-tag">&lt;artifactId&gt;</span>coyote<span class="code-tag">&lt;/artifactId&gt;</span>
        <span class="code-tag">&lt;version&gt;</span>6.0.18<span class="code-tag">&lt;/version&gt;</span>
        <span class="code-tag">&lt;type&gt;</span>jar<span class="code-tag">&lt;/type&gt;</span>
      <span class="code-tag">&lt;/dependency&gt;</span>
      <span class="code-tag">&lt;dependency&gt;</span>
        <span class="code-tag">&lt;groupId&gt;</span>org.apache.tomcat.extras<span class="code-tag">&lt;/groupId&gt;</span>
        <span class="code-tag">&lt;artifactId&gt;</span>juli<span class="code-tag">&lt;/artifactId&gt;</span>
        <span class="code-tag">&lt;version&gt;</span>6.0.18<span class="code-tag">&lt;/version&gt;</span>
        <span class="code-tag">&lt;type&gt;</span>jar<span class="code-tag">&lt;/type&gt;</span>
      <span class="code-tag">&lt;/dependency&gt;</span>
      <span class="code-tag">&lt;dependency&gt;</span>
        <span class="code-tag">&lt;groupId&gt;</span>org.apache.tomcat.extras<span class="code-tag">&lt;/groupId&gt;</span>
        <span class="code-tag">&lt;artifactId&gt;</span>juli-adapters<span class="code-tag">&lt;/artifactId&gt;</span>
        <span class="code-tag">&lt;version&gt;</span>6.0.18<span class="code-tag">&lt;/version&gt;</span>
        <span class="code-tag">&lt;type&gt;</span>jar<span class="code-tag">&lt;/type&gt;</span>
      <span class="code-tag">&lt;/dependency&gt;</span>
    <span class="code-tag">&lt;/dependencies&gt;</span>
    <span class="code-tag">&lt;hidden-classes/&gt;</span>
    <span class="code-tag">&lt;non-overridable-classes/&gt;</span>
  <span class="code-tag">&lt;/environment&gt;</span>
   &lt;gbean
    class=<span class="code-quote">"org.apache.geronimo.tomcat.cluster.CatalinaClusterGBean"</span> name=<span class="code-quote">"TomcatCluster"</span>&gt;
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"className"</span>&gt;</span>
      org.apache.catalina.ha.tcp.SimpleTcpCluster
    <span class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"initParams"</span>&gt;</span>
      managerClassName=org.apache.catalina.ha.session.DeltaManager
      expireSessionsOnShutdown=false
      useDirtyFlag=true
      notifyListenersOnReplication=true
    <span class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;reference name=<span class="code-quote">"TomcatValveChain"</span>&gt;</span>

      <span class="code-tag">&lt;name&gt;</span>ReplicationValve<span class="code-tag">&lt;/name&gt;</span>
    <span class="code-tag">&lt;/reference&gt;</span>
    <span class="code-tag">&lt;reference name=<span class="code-quote">"ClusterListenerChain"</span>&gt;</span>
      <span class="code-tag">&lt;name&gt;</span>ClusterSessionListener<span class="code-tag">&lt;/name&gt;</span>
    <span class="code-tag">&lt;/reference&gt;</span>
    <span class="code-tag">&lt;reference name=<span class="code-quote">"Channel"</span>&gt;</span>
      <span class="code-tag">&lt;name&gt;</span>TomcatGroupChannel<span class="code-tag">&lt;/name&gt;</span>
    <span class="code-tag">&lt;/reference&gt;</span>
  <span class="code-tag">&lt;/gbean&gt;</span>

  <span class="code-tag"><span class="code-comment">&lt;!-- Cluster Channel --&gt;</span></span>
  <span class="code-tag">&lt;gbean class=<span class="code-quote">"org.apache.geronimo.tomcat.cluster.ChannelGBean"</span>  name=<span class="code-quote">"TomcatGroupChannel"</span>&gt;</span>
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"className"</span>&gt;</span>
      org.apache.catalina.tribes.group.GroupChannel
    <span class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"initParams"</span>/&gt;</span>
      <span class="code-tag">&lt;reference name=<span class="code-quote">"Membership"</span>&gt;</span>
        <span class="code-tag">&lt;name&gt;</span>TomcatMembership<span class="code-tag">&lt;/name&gt;</span>
      <span class="code-tag">&lt;/reference&gt;</span>
      <span class="code-tag">&lt;reference name=<span class="code-quote">"Receiver"</span>&gt;</span>
        <span class="code-tag">&lt;name&gt;</span>TomcatReceiver<span class="code-tag">&lt;/name&gt;</span>
      <span class="code-tag">&lt;/reference&gt;</span>
      <span class="code-tag">&lt;reference name=<span class="code-quote">"Sender"</span>&gt;</span>
        <span class="code-tag">&lt;name&gt;</span>TomcatSender<span class="code-tag">&lt;/name&gt;</span>
      <span class="code-tag">&lt;/reference&gt;</span>
      <span class="code-tag">&lt;reference name=<span class="code-quote">"ChannelInterceptor"</span>&gt;</span>
        <span class="code-tag">&lt;name&gt;</span>TomcatChannelInterceptor<span class="code-tag">&lt;/name&gt;</span>
      <span class="code-tag">&lt;/reference&gt;</span>
  <span class="code-tag">&lt;/gbean&gt;</span>

  <span class="code-tag"><span class="code-comment">&lt;!-- Cluster Membership --&gt;</span></span>
  <span class="code-tag">&lt;gbean  class=<span class="code-quote">"org.apache.geronimo.tomcat.cluster.MembershipServiceGBean"</span> name=<span class="code-quote">"TomcatMembership"</span>&gt;</span>
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"className"</span>&gt;</span>
      org.apache.catalina.tribes.membership.McastService
    <span class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"initParams"</span>&gt;</span>
      mcastAddr=228.0.0.4
      mcastPort=45564
      mcastFrequency=500
      mcastDropTime=3000
    <span class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;/gbean&gt;</span>

  <span class="code-tag"><span class="code-comment">&lt;!-- Cluster Receiver --&gt;</span></span>
  <span class="code-tag">&lt;gbean class=<span class="code-quote">"org.apache.geronimo.tomcat.cluster.ReceiverGBean"</span> name=<span class="code-quote">"TomcatReceiver"</span>&gt;</span>
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"className"</span>&gt;</span>
      org.apache.catalina.tribes.transport.nio.NioReceiver
    <span class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"initParams"</span>&gt;</span>
      tcpListenAddress=IPAddressIn
      tcpListenPort=4001
      tcpSelectorTimeout=100
      tcpThreadCount=6
    <span class="code-tag">&lt;/attribute&gt;</span>
  <span class="code-tag">&lt;/gbean&gt;</span>

  <span class="code-tag"><span class="code-comment">&lt;!-- Cluster Sender --&gt;</span></span>
  <span class="code-tag">&lt;gbean class=<span class="code-quote">"org.apache.geronimo.tomcat.cluster.SenderGBean"</span> name=<span class="code-quote">"TomcatSender"</span>&gt;</span>
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"className"</span>&gt;</span>
      org.apache.catalina.tribes.transport.ReplicationTransmitter
    <span class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"initParams"</span>&gt;</span>
      replicationMode=pooled
      waitForAck=true
    <span class="code-tag">&lt;/attribute&gt;</span>
  <span class="code-tag">&lt;/gbean&gt;</span>

  <span class="code-tag"><span class="code-comment">&lt;!-- Cluster Replication Valve --&gt;</span></span>
  <span class="code-tag">&lt;gbean class=<span class="code-quote">"org.apache.geronimo.tomcat.ValveGBean"</span> name=<span class="code-quote">"ReplicationValve"</span>&gt;</span>

    <span class="code-tag">&lt;attribute name=<span class="code-quote">"className"</span>&gt;</span>
      org.apache.catalina.ha.tcp.ReplicationValve
    <span class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"initParams"</span>&gt;</span>
      filter=.*\.gif;.*\.js;.*\.css;.*\.png;.*\.jpeg;.*\.jpg;.*\.htm;.*\.html;.*\.txt;
    <span class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;reference name=<span class="code-quote">"NextValve"</span>&gt;</span>
      <span class="code-tag">&lt;type&gt;</span>TomcatValve<span class="code-tag">&lt;/type&gt;</span>
      <span class="code-tag">&lt;name&gt;</span>JvmRouteBinderValve<span class="code-tag">&lt;/name&gt;</span>
    <span class="code-tag">&lt;/reference&gt;</span>
  <span class="code-tag">&lt;/gbean&gt;</span>

  <span class="code-tag"><span class="code-comment">&lt;!-- Cluster Route Binder --&gt;</span></span>
  &lt;gbean
    class=<span class="code-quote">"org.apache.geronimo.tomcat.ValveGBean"</span>
    name=<span class="code-quote">"JvmRouteBinderValve"</span>&gt;
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"className"</span>&gt;</span>
      org.apache.catalina.ha.session.JvmRouteBinderValve
    <span class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"initParams"</span>&gt;</span>
        enabled=true
    <span class="code-tag">&lt;/attribute&gt;</span>
  <span class="code-tag">&lt;/gbean&gt;</span>

  <span class="code-tag"><span class="code-comment">&lt;!-- Cluster Listener --&gt;</span></span>
  &lt;gbean
    class=<span class="code-quote">"org.apache.geronimo.tomcat.cluster.ClusterListenerGBean"</span>
    name=<span class="code-quote">"ClusterSessionListener"</span>&gt;
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"className"</span>&gt;</span>
      org.apache.catalina.ha.session.ClusterSessionListener
    <span class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;reference name=<span class="code-quote">"NextListener"</span>&gt;</span>
        <span class="code-tag">&lt;name&gt;</span>JvmRouteSessionIDBinderListener<span class="code-tag">&lt;/name&gt;</span>
    <span class="code-tag">&lt;/reference&gt;</span>
  <span class="code-tag">&lt;/gbean&gt;</span>

  <span class="code-tag"><span class="code-comment">&lt;!-- Cluster Binder Listener --&gt;</span></span>
  &lt;gbean
    class=<span class="code-quote">"org.apache.geronimo.tomcat.cluster.ClusterListenerGBean"</span>
    name=<span class="code-quote">"JvmRouteSessionIDBinderListener"</span>&gt;
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"className"</span>&gt;</span>
      org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener
    <span class="code-tag">&lt;/attribute&gt;</span>
  <span class="code-tag">&lt;/gbean&gt;</span>

  <span class="code-tag"><span class="code-comment">&lt;!-- Cluster Channel Interceptor --&gt;</span></span>
  &lt;gbean
    class=<span class="code-quote">"org.apache.geronimo.tomcat.cluster.ChannelInterceptorGBean"</span>
    name=<span class="code-quote">"TomcatChannelInterceptor"</span>&gt;
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"className"</span>&gt;</span>
      org.apache.catalina.tribes.group.interceptors.TcpFailureDetector
    <span class="code-tag">&lt;/attribute&gt;</span>
  <span class="code-tag">&lt;/gbean&gt;</span>
<span class="code-tag">&lt;/module&gt;</span>
</pre>
</div></div>
<p>where</p>
<ul>
	<li><em>Modulegroup</em>, <em>ModuleId</em> and <em>ModuleVersion</em> can be specified as any names that you want.</li>
	<li><em>IPAddressIn</em> is the host name or IP address where the node listens for TCP connections that carry session replication messages.</li>
</ul>


<p>More information on other parameter values and performance options can be found on the <a href="http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html" rel="nofollow">Tomcat session replication Web site</a>.</p>

<p>When you have built a deployment plan for each node in the cluster, deploy the plan on each node as followed:</p>
<div class="panel" style="border-style: solid;border-width: 1px;"><div class="panelContent">
<p><tt>deploy --user <em>name</em> --password <em>word</em> deploy <em>plan</em></tt></p>
</div></div>
<p>where </p>
<ul>
	<li><em>name</em> is replaced with a user name authorized to manage the server. If you omit this option, you will be prompted to enter a user name.</li>
	<li><em>word</em> is replaced with the password used to authenticate the user. If you omit this option, you will be prompted to enter a password.</li>
	<li><em>plan</em> is replaced with a file specification to your deployment plan. If You use the template and file name above, <em>plan</em> should be replaced with <tt>cluster_Enable_plan.xml</tt></li>
</ul>



<h3><a name="TomcatNativeClustering-DeployingyourWebapplicationtothecluster"></a>Deploying your Web application to the cluster</h3>

<p>When you deploy your Web application that is to participate in a Tomcat cluster, you must include a <b>container-config</b> element to match the application to the desired cluster. Insert a <b>container-config</b> element after any <b>context-root</b> and <b>context-priority-classloader</b> elements using the following template. And of course dependency reference with the pre-deployed module should be enclosed. </p>
<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>Excerpt from web.xml or application.xml</b></div><div class="codeContent panelContent">
<pre class="code-xml">
&lt;web-app xmlns=<span class="code-quote">"http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1"</span> 
    <span class="code-keyword">xmlns:dep</span>=<span class="code-quote">"http://geronimo.apache.org/xml/ns/deployment-1.2"</span>
    <span class="code-keyword">xmlns:sec</span>=<span class="code-quote">"http://geronimo.apache.org/xml/ns/security-2.0"</span>&gt;
...
<span class="code-tag">&lt;dep:dependencies&gt;</span>
     <span class="code-tag">&lt;dep:dependency&gt;</span>
        <span class="code-tag">&lt;dep:groupId&gt;</span>Modulegroud<span class="code-tag">&lt;/dep:groupId&gt;</span>
      <span class="code-tag">&lt;dep:artifactId&gt;</span>ModuleId<span class="code-tag">&lt;/dep:artifactId&gt;</span>
      <span class="code-tag">&lt;dep:version&gt;</span>ModuleVersion<span class="code-tag">&lt;/dep:version&gt;</span>
      <span class="code-tag">&lt;dep:type&gt;</span>car<span class="code-tag">&lt;/dep:type&gt;</span>
    <span class="code-tag">&lt;/dep:dependency&gt;</span>
    <span class="code-tag">&lt;/dep:dependencies&gt;</span>
...
 <span class="code-tag">&lt;container-config&gt;</span>
    <span class="code-tag">&lt;tomcat <span class="code-keyword">xmlns:tomcat</span>=<span class="code-quote">"http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-2.0.1"</span>&gt;</span>
             <span class="code-tag">&lt;cluster&gt;</span>name<span class="code-tag">&lt;/cluster&gt;</span>
    <span class="code-tag">&lt;/tomcat&gt;</span>
<span class="code-tag">&lt;/container-config&gt;</span>
</pre>
</div></div>
<p>where</p>
<ul>
	<li><em>Modulegroup</em>, <em>ModuleId</em> and <em>ModuleVersion</em> should be consistent with the identity set of the pre-deployed module.</li>
	<li><em>name</em> matches the value specified on the <b>name=</b> attribute of the cluster <b>&lt;gbean&gt;</b> tag in the deployment plan used to deploy the Tomcat clustering feature. (The cluster <b>&lt;gbean&gt;</b> has the attribute <b>class="org.apache.geronimo.tomcat.cluster.CatalinaClusterGBean"</b>.) If you used the template above, you would specify the value <b>TomcatCluster</b>. Once you have modified your application's deployment plan to use the cluster, use it to deploy (or refresh) your application on each node in the cluster.</li>
</ul>


<h1><a name="TomcatNativeClustering-SampleTomcatClusteringwithUnicastConfiguration"></a>Sample Tomcat Clustering with Unicast Configuration</h1>

<p>The following is a clustering example that uses a unicast configuration.  Two static members are defined.  To convert this example to a multicast configuration the DisableMCastInterceptor, StaticMemberInterceptor, and StaticMember definitions need to be removed.  Also, the value for the "address" attribute for the TomcatReceiver definition should be changed to "auto". </p>

<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml">
&lt;gbean name=<span class="code-quote">"org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car?ServiceModule=org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car,j2eeType=Cluster,name=TomcatCluster"</span> 
       gbeanInfo=<span class="code-quote">"org.apache.geronimo.tomcat.cluster.CatalinaClusterGBean"</span>&gt;
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"className"</span>&gt;</span>org.apache.catalina.ha.tcp.SimpleTcpCluster<span class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"initParams"</span>/&gt;</span>
    <span class="code-tag">&lt;reference name=<span class="code-quote">"ClusterListenerChain"</span>&gt;</span>
        <span class="code-tag">&lt;pattern&gt;</span>
            <span class="code-tag">&lt;groupId&gt;</span>org.apache.geronimo.configs<span class="code-tag">&lt;/groupId&gt;</span>
            <span class="code-tag">&lt;artifactId&gt;</span>tomcat6<span class="code-tag">&lt;/artifactId&gt;</span>
            <span class="code-tag">&lt;version&gt;</span>2.2-SNAPSHOT<span class="code-tag">&lt;/version&gt;</span>
            <span class="code-tag">&lt;type&gt;</span>car<span class="code-tag">&lt;/type&gt;</span>
            <span class="code-tag">&lt;name&gt;</span>TomcatClusterListenerChain<span class="code-tag">&lt;/name&gt;</span>
        <span class="code-tag">&lt;/pattern&gt;</span>
    <span class="code-tag">&lt;/reference&gt;</span>
    <span class="code-tag">&lt;reference name=<span class="code-quote">"TomcatValveChain"</span>&gt;</span>
        <span class="code-tag">&lt;pattern&gt;</span>
            <span class="code-tag">&lt;groupId&gt;</span>org.apache.geronimo.configs<span class="code-tag">&lt;/groupId&gt;</span>
            <span class="code-tag">&lt;artifactId&gt;</span>tomcat6<span class="code-tag">&lt;/artifactId&gt;</span>
            <span class="code-tag">&lt;version&gt;</span>2.2-SNAPSHOT<span class="code-tag">&lt;/version&gt;</span>
            <span class="code-tag">&lt;type&gt;</span>car<span class="code-tag">&lt;/type&gt;</span>
            <span class="code-tag">&lt;name&gt;</span>ReplicationValve<span class="code-tag">&lt;/name&gt;</span>
        <span class="code-tag">&lt;/pattern&gt;</span>
    <span class="code-tag">&lt;/reference&gt;</span>
    <span class="code-tag">&lt;reference name=<span class="code-quote">"Channel"</span>&gt;</span>
        <span class="code-tag">&lt;pattern&gt;</span>
            <span class="code-tag">&lt;groupId&gt;</span>org.apache.geronimo.configs<span class="code-tag">&lt;/groupId&gt;</span>
            <span class="code-tag">&lt;artifactId&gt;</span>tomcat6<span class="code-tag">&lt;/artifactId&gt;</span>
            <span class="code-tag">&lt;version&gt;</span>2.2-SNAPSHOT<span class="code-tag">&lt;/version&gt;</span>
            <span class="code-tag">&lt;type&gt;</span>car<span class="code-tag">&lt;/type&gt;</span>
            <span class="code-tag">&lt;name&gt;</span>TomcatChannel<span class="code-tag">&lt;/name&gt;</span>
        <span class="code-tag">&lt;/pattern&gt;</span>
    <span class="code-tag">&lt;/reference&gt;</span>
    <span class="code-tag">&lt;reference name=<span class="code-quote">"ClusterManager"</span>&gt;</span>
        <span class="code-tag">&lt;pattern&gt;</span>
            <span class="code-tag">&lt;groupId&gt;</span>org.apache.geronimo.configs<span class="code-tag">&lt;/groupId&gt;</span>
            <span class="code-tag">&lt;artifactId&gt;</span>tomcat6<span class="code-tag">&lt;/artifactId&gt;</span>
            <span class="code-tag">&lt;version&gt;</span>2.2-SNAPSHOT<span class="code-tag">&lt;/version&gt;</span>
            <span class="code-tag">&lt;type&gt;</span>car<span class="code-tag">&lt;/type&gt;</span>
            <span class="code-tag">&lt;name&gt;</span>TomcatClusterManager<span class="code-tag">&lt;/name&gt;</span>
        <span class="code-tag">&lt;/pattern&gt;</span>
    <span class="code-tag">&lt;/reference&gt;</span>
<span class="code-tag">&lt;/gbean&gt;</span>
&lt;gbean name=<span class="code-quote">"org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car?ServiceModule=org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car,j2eeType=ClusterListener,name=TomcatClusterListenerChain"</span>
       gbeanInfo=<span class="code-quote">"org.apache.geronimo.tomcat.cluster.ClusterListenerGBean"</span>&gt;
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"className"</span>&gt;</span>org.apache.catalina.ha.session.ClusterSessionListener<span class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"initParams"</span>/&gt;</span>
<span class="code-tag">&lt;/gbean&gt;</span>
&lt;gbean name=<span class="code-quote">"org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car?ServiceModule=org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car,j2eeType=TomcatValve,name=ReplicationValve"</span>
       gbeanInfo=<span class="code-quote">"org.apache.geronimo.tomcat.ValveGBean"</span>&gt;
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"className"</span>&gt;</span>org.apache.catalina.ha.tcp.ReplicationValve<span class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"initParams"</span>&gt;</span>.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;<span class="code-tag">&lt;/attribute&gt;</span>
<span class="code-tag">&lt;/gbean&gt;</span>
&lt;gbean name=<span class="code-quote">"org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car?ServiceModule=org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car,j2eeType=ClusterManager,name=TomcatClusterManager"</span>
       gbeanInfo=<span class="code-quote">"org.apache.geronimo.tomcat.cluster.ClusterManagerGBean"</span>&gt;
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"className"</span>&gt;</span>org.apache.catalina.ha.session.DeltaManager<span class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"initParams"</span>&gt;</span>name=${clusterName}
        channelSendOptions=6
        expireSessionsOnShutdown=false
        notifyListenersOnReplication=true
        mapSendOptions=6<span class="code-tag">&lt;/attribute&gt;</span>
<span class="code-tag">&lt;/gbean&gt;</span>
&lt;gbean name=<span class="code-quote">"org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car?ServiceModule=org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car,j2eeType=Channel,name=TomcatChannel"</span>
       gbeanInfo=<span class="code-quote">"org.apache.geronimo.tomcat.cluster.ChannelGBean"</span>&gt;
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"className"</span>&gt;</span>org.apache.catalina.tribes.group.GroupChannel<span class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"initParams"</span>/&gt;</span>
    <span class="code-tag">&lt;reference name=<span class="code-quote">"Membership"</span>&gt;</span>
        <span class="code-tag">&lt;pattern&gt;</span>
            <span class="code-tag">&lt;groupId&gt;</span>org.apache.geronimo.configs<span class="code-tag">&lt;/groupId&gt;</span>
            <span class="code-tag">&lt;artifactId&gt;</span>tomcat6<span class="code-tag">&lt;/artifactId&gt;</span>
            <span class="code-tag">&lt;version&gt;</span>2.2-SNAPSHOT<span class="code-tag">&lt;/version&gt;</span>
            <span class="code-tag">&lt;type&gt;</span>car<span class="code-tag">&lt;/type&gt;</span>
            <span class="code-tag">&lt;name&gt;</span>ClusterMembership<span class="code-tag">&lt;/name&gt;</span>
        <span class="code-tag">&lt;/pattern&gt;</span>
    <span class="code-tag">&lt;/reference&gt;</span>
    <span class="code-tag">&lt;reference name=<span class="code-quote">"Receiver"</span>&gt;</span>
        <span class="code-tag">&lt;pattern&gt;</span>
            <span class="code-tag">&lt;groupId&gt;</span>org.apache.geronimo.configs<span class="code-tag">&lt;/groupId&gt;</span>
            <span class="code-tag">&lt;artifactId&gt;</span>tomcat6<span class="code-tag">&lt;/artifactId&gt;</span>
            <span class="code-tag">&lt;version&gt;</span>2.2-SNAPSHOT<span class="code-tag">&lt;/version&gt;</span>
            <span class="code-tag">&lt;type&gt;</span>car<span class="code-tag">&lt;/type&gt;</span>
            <span class="code-tag">&lt;name&gt;</span>ClusterReceiver<span class="code-tag">&lt;/name&gt;</span>
        <span class="code-tag">&lt;/pattern&gt;</span>
    <span class="code-tag">&lt;/reference&gt;</span>
    <span class="code-tag">&lt;reference name=<span class="code-quote">"Sender"</span>&gt;</span>
        <span class="code-tag">&lt;pattern&gt;</span>
            <span class="code-tag">&lt;groupId&gt;</span>org.apache.geronimo.configs<span class="code-tag">&lt;/groupId&gt;</span>
            <span class="code-tag">&lt;artifactId&gt;</span>tomcat6<span class="code-tag">&lt;/artifactId&gt;</span>
            <span class="code-tag">&lt;version&gt;</span>2.2-SNAPSHOT<span class="code-tag">&lt;/version&gt;</span>
            <span class="code-tag">&lt;type&gt;</span>car<span class="code-tag">&lt;/type&gt;</span>
            <span class="code-tag">&lt;name&gt;</span>ClusterSender<span class="code-tag">&lt;/name&gt;</span>
        <span class="code-tag">&lt;/pattern&gt;</span>
    <span class="code-tag">&lt;/reference&gt;</span>
    <span class="code-tag">&lt;reference name=<span class="code-quote">"ChannelInterceptor"</span>&gt;</span>
        <span class="code-tag">&lt;pattern&gt;</span>
            <span class="code-tag">&lt;groupId&gt;</span>org.apache.geronimo.configs<span class="code-tag">&lt;/groupId&gt;</span>
            <span class="code-tag">&lt;artifactId&gt;</span>tomcat6<span class="code-tag">&lt;/artifactId&gt;</span>
            <span class="code-tag">&lt;version&gt;</span>2.2-SNAPSHOT<span class="code-tag">&lt;/version&gt;</span>
            <span class="code-tag">&lt;type&gt;</span>car<span class="code-tag">&lt;/type&gt;</span>
            <span class="code-tag">&lt;name&gt;</span>DisableMcastInterceptor<span class="code-tag">&lt;/name&gt;</span>
        <span class="code-tag">&lt;/pattern&gt;</span>
    <span class="code-tag">&lt;/reference&gt;</span>
<span class="code-tag">&lt;/gbean&gt;</span>
&lt;gbean name=<span class="code-quote">"org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car?ServiceModule=org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car,j2eeType=MembershipService,name=ClusterMembership"</span>
       gbeanInfo=<span class="code-quote">"org.apache.geronimo.tomcat.cluster.MembershipServiceGBean"</span>&gt;
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"className"</span>&gt;</span>org.apache.catalina.tribes.membership.McastService<span class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"initParams"</span>&gt;</span>address=228.0.0.4
        port=45564
        frequency=500
        dropTime=3000<span class="code-tag">&lt;/attribute&gt;</span>
<span class="code-tag">&lt;/gbean&gt;</span>
&lt;gbean name=<span class="code-quote">"org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car?ServiceModule=org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car,j2eeType=Receiver,name=ClusterReceiver"</span>
       gbeanInfo=<span class="code-quote">"org.apache.geronimo.tomcat.cluster.ReceiverGBean"</span>&gt;
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"className"</span>&gt;</span>org.apache.catalina.tribes.transport.nio.NioReceiver<span class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"initParams"</span>&gt;</span>address=localhost
        port=5000
        selectorTimeout=100
        maxThreads=6<span class="code-tag">&lt;/attribute&gt;</span>
<span class="code-tag">&lt;/gbean&gt;</span>
&lt;gbean name=<span class="code-quote">"org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car?ServiceModule=org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car,j2eeType=Sender,name=ClusterSender"</span>
       gbeanInfo=<span class="code-quote">"org.apache.geronimo.tomcat.cluster.SenderGBean"</span>&gt;
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"className"</span>&gt;</span>org.apache.catalina.tribes.transport.ReplicationTransmitter<span class="code-tag">&lt;/attribute&gt;</span>
<span class="code-tag">&lt;/gbean&gt;</span>
&lt;gbean name=<span class="code-quote">"org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car?ServiceModule=org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car,j2eeType=ChannelInterceptor,name=DisableMcastInterceptor"</span>
       gbeanInfo=<span class="code-quote">"org.apache.geronimo.tomcat.cluster.ChannelInterceptorGBean"</span>&gt;
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"className"</span>&gt;</span>org.apache.geronimo.tomcat.interceptor.DisableMcastInterceptor<span class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"initParams"</span>/&gt;</span>
    <span class="code-tag">&lt;reference name=<span class="code-quote">"NextInterceptor"</span>&gt;</span>
        <span class="code-tag">&lt;pattern&gt;</span>
            <span class="code-tag">&lt;groupId&gt;</span>org.apache.geronimo.configs<span class="code-tag">&lt;/groupId&gt;</span>
            <span class="code-tag">&lt;artifactId&gt;</span>tomcat6<span class="code-tag">&lt;/artifactId&gt;</span>
            <span class="code-tag">&lt;version&gt;</span>2.2-SNAPSHOT<span class="code-tag">&lt;/version&gt;</span>
            <span class="code-tag">&lt;type&gt;</span>car<span class="code-tag">&lt;/type&gt;</span>
            <span class="code-tag">&lt;name&gt;</span>TcpPingInterceptor<span class="code-tag">&lt;/name&gt;</span>
        <span class="code-tag">&lt;/pattern&gt;</span>
    <span class="code-tag">&lt;/reference&gt;</span>
<span class="code-tag">&lt;/gbean&gt;</span>
&lt;gbean name=<span class="code-quote">"org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car?ServiceModule=org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car,j2eeType=ChannelInterceptor,name=TcpPingInterceptor"</span>
       gbeanInfo=<span class="code-quote">"org.apache.geronimo.tomcat.cluster.ChannelInterceptorGBean"</span>&gt;
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"className"</span>&gt;</span>org.apache.catalina.tribes.group.interceptors.TcpPingInterceptor<span class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"initParams"</span>&gt;</span>Interval=60<span class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;reference name=<span class="code-quote">"NextInterceptor"</span>&gt;</span>
        <span class="code-tag">&lt;pattern&gt;</span>
            <span class="code-tag">&lt;groupId&gt;</span>org.apache.geronimo.configs<span class="code-tag">&lt;/groupId&gt;</span>
            <span class="code-tag">&lt;artifactId&gt;</span>tomcat6<span class="code-tag">&lt;/artifactId&gt;</span>
            <span class="code-tag">&lt;version&gt;</span>2.2-SNAPSHOT<span class="code-tag">&lt;/version&gt;</span>
            <span class="code-tag">&lt;type&gt;</span>car<span class="code-tag">&lt;/type&gt;</span>
            <span class="code-tag">&lt;name&gt;</span>TcpFailureDetector<span class="code-tag">&lt;/name&gt;</span>
        <span class="code-tag">&lt;/pattern&gt;</span>
    <span class="code-tag">&lt;/reference&gt;</span>
<span class="code-tag">&lt;/gbean&gt;</span>
&lt;gbean name=<span class="code-quote">"org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car?ServiceModule=org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car,j2eeType=ChannelInterceptor,name=TcpFailureDetector"</span>
       gbeanInfo=<span class="code-quote">"org.apache.geronimo.tomcat.cluster.ChannelInterceptorGBean"</span>&gt;
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"className"</span>&gt;</span>org.apache.catalina.tribes.group.interceptors.TcpFailureDetector<span class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"initParams"</span>/&gt;</span>
    <span class="code-tag">&lt;reference name=<span class="code-quote">"NextInterceptor"</span>&gt;</span>
        <span class="code-tag">&lt;pattern&gt;</span>
            <span class="code-tag">&lt;groupId&gt;</span>org.apache.geronimo.configs<span class="code-tag">&lt;/groupId&gt;</span>
            <span class="code-tag">&lt;artifactId&gt;</span>tomcat6<span class="code-tag">&lt;/artifactId&gt;</span>
            <span class="code-tag">&lt;version&gt;</span>2.2-SNAPSHOT<span class="code-tag">&lt;/version&gt;</span>
            <span class="code-tag">&lt;type&gt;</span>car<span class="code-tag">&lt;/type&gt;</span>
            <span class="code-tag">&lt;name&gt;</span>StaticMember1Interceptor<span class="code-tag">&lt;/name&gt;</span>
        <span class="code-tag">&lt;/pattern&gt;</span>
    <span class="code-tag">&lt;/reference&gt;</span>
<span class="code-tag">&lt;/gbean&gt;</span>
&lt;gbean name=<span class="code-quote">"org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car?ServiceModule=org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car,j2eeType=ChannelInterceptor,name=StaticMember1Interceptor"</span>
       gbeanInfo=<span class="code-quote">"org.apache.geronimo.tomcat.cluster.ChannelInterceptorGBean"</span>&gt;
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"className"</span>&gt;</span>org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor<span class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"initParams"</span>/&gt;</span>
    <span class="code-tag">&lt;reference name=<span class="code-quote">"StaticMember"</span>&gt;</span>
        <span class="code-tag">&lt;pattern&gt;</span>
            <span class="code-tag">&lt;groupId&gt;</span>org.apache.geronimo.configs<span class="code-tag">&lt;/groupId&gt;</span>
            <span class="code-tag">&lt;artifactId&gt;</span>tomcat6<span class="code-tag">&lt;/artifactId&gt;</span>
            <span class="code-tag">&lt;version&gt;</span>2.2-SNAPSHOT<span class="code-tag">&lt;/version&gt;</span>
            <span class="code-tag">&lt;type&gt;</span>car<span class="code-tag">&lt;/type&gt;</span>
            <span class="code-tag">&lt;name&gt;</span>StaticMember1<span class="code-tag">&lt;/name&gt;</span>
        <span class="code-tag">&lt;/pattern&gt;</span>
    <span class="code-tag">&lt;/reference&gt;</span>
    <span class="code-tag">&lt;reference name=<span class="code-quote">"NextInterceptor"</span>&gt;</span>
        <span class="code-tag">&lt;pattern&gt;</span>
            <span class="code-tag">&lt;groupId&gt;</span>org.apache.geronimo.configs<span class="code-tag">&lt;/groupId&gt;</span>
            <span class="code-tag">&lt;artifactId&gt;</span>tomcat6<span class="code-tag">&lt;/artifactId&gt;</span>
            <span class="code-tag">&lt;version&gt;</span>2.2-SNAPSHOT<span class="code-tag">&lt;/version&gt;</span>
            <span class="code-tag">&lt;type&gt;</span>car<span class="code-tag">&lt;/type&gt;</span>
            <span class="code-tag">&lt;name&gt;</span>MessageDispatch15Interceptor<span class="code-tag">&lt;/name&gt;</span>
        <span class="code-tag">&lt;/pattern&gt;</span>
    <span class="code-tag">&lt;/reference&gt;</span>
<span class="code-tag">&lt;/gbean&gt;</span>
&lt;gbean name=<span class="code-quote">"org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car?ServiceModule=org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car,j2eeType=ChannelInterceptor,name=MessageDispatch15Interceptor"</span>
       gbeanInfo=<span class="code-quote">"org.apache.geronimo.tomcat.cluster.ChannelInterceptorGBean"</span>&gt;
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"className"</span>&gt;</span>org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor<span class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"initParams"</span>/&gt;</span>
    <span class="code-tag">&lt;reference name=<span class="code-quote">"NextInterceptor"</span>&gt;</span>
        <span class="code-tag">&lt;pattern&gt;</span>
            <span class="code-tag">&lt;groupId&gt;</span>org.apache.geronimo.configs<span class="code-tag">&lt;/groupId&gt;</span>
            <span class="code-tag">&lt;artifactId&gt;</span>tomcat6<span class="code-tag">&lt;/artifactId&gt;</span>
            <span class="code-tag">&lt;version&gt;</span>2.2-SNAPSHOT<span class="code-tag">&lt;/version&gt;</span>
            <span class="code-tag">&lt;type&gt;</span>car<span class="code-tag">&lt;/type&gt;</span>
            <span class="code-tag">&lt;name&gt;</span>ThroughputInterceptor<span class="code-tag">&lt;/name&gt;</span>
        <span class="code-tag">&lt;/pattern&gt;</span>
    <span class="code-tag">&lt;/reference&gt;</span>
<span class="code-tag">&lt;/gbean&gt;</span>
&lt;gbean name=<span class="code-quote">"org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car?ServiceModule=org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car,j2eeType=ChannelInterceptor,name=ThroughputInterceptor"</span>
       gbeanInfo=<span class="code-quote">"org.apache.geronimo.tomcat.cluster.ChannelInterceptorGBean"</span>&gt;
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"className"</span>&gt;</span>org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor<span class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"initParams"</span>/&gt;</span>
<span class="code-tag">&lt;/gbean&gt;</span>
&lt;gbean name=<span class="code-quote">"org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car?ServiceModule=org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car,j2eeType=StaticMember,name=StaticMember1"</span>
       gbeanInfo=<span class="code-quote">"org.apache.geronimo.tomcat.cluster.StaticMemberGBean"</span>&gt;
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"className"</span>&gt;</span>org.apache.catalina.tribes.membership.StaticMember<span class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"initParams"</span>&gt;</span>port=5001
        securePort=-1
        host=localhost
        domain=test-domain
        UniqueId={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}<span class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;reference name=<span class="code-quote">"NextStaticMember"</span>&gt;</span>
        <span class="code-tag">&lt;pattern&gt;</span>
            <span class="code-tag">&lt;groupId&gt;</span>org.apache.geronimo.configs<span class="code-tag">&lt;/groupId&gt;</span>
            <span class="code-tag">&lt;artifactId&gt;</span>tomcat6<span class="code-tag">&lt;/artifactId&gt;</span>
            <span class="code-tag">&lt;version&gt;</span>2.2-SNAPSHOT<span class="code-tag">&lt;/version&gt;</span>
            <span class="code-tag">&lt;type&gt;</span>car<span class="code-tag">&lt;/type&gt;</span>
            <span class="code-tag">&lt;name&gt;</span>StaticMember2<span class="code-tag">&lt;/name&gt;</span>
        <span class="code-tag">&lt;/pattern&gt;</span>
    <span class="code-tag">&lt;/reference&gt;</span>
<span class="code-tag">&lt;/gbean&gt;</span>
&lt;gbean name=<span class="code-quote">"org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car?ServiceModule=org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car,j2eeType=StaticMember,name=StaticMember2"</span>
       gbeanInfo=<span class="code-quote">"org.apache.geronimo.tomcat.cluster.StaticMemberGBean"</span>&gt;
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"className"</span>&gt;</span>org.apache.catalina.tribes.membership.StaticMember<span class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"initParams"</span>&gt;</span>port=5002
        securePort=-1
        host=localhost
        domain=test-domain
        UniqueId={1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}<span class="code-tag">&lt;/attribute&gt;</span>
<span class="code-tag">&lt;/gbean&gt;</span>
</pre>
</div></div>

     </div>
     <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;">
            <a href="http://cwiki.apache.org/confluence/users/viewnotifications.action" class="grey">Change Notification Preferences</a>
       </div>

       <a href="http://cwiki.apache.org/confluence/display/GMOxDOC22/Tomcat+Native+Clustering">View Online</a>
       |
       <a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=97071&revisedVersion=10&originalVersion=9">View Change</a>
              |
       <a href="http://cwiki.apache.org/confluence/display/GMOxDOC22/Tomcat+Native+Clustering?showComments=true&amp;showCommentArea=true#addcomment">Add Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message