<?xml version="1.0" encoding="UTF-8"?>
<!--

Copyright 2004-2005 The Apache Software Foundation

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-1.0"
    configId="geronimo/servlets-examples/1.0/war">
    <context-root>/servlets-examples-cluster</context-root>
    <context-priority-classloader>false</context-priority-classloader>

    <cluster>TomcatCluster</cluster>

    <!-- Cluster -->
    <gbean name="TomcatCluster" class="org.apache.geronimo.tomcat.cluster.CatalinaClusterGBean">
        <attribute name="className">org.apache.catalina.cluster.tcp.SimpleTcpCluster</attribute>
        <attribute name="initParams">
            managerClassName=org.apache.catalina.cluster.session.DeltaManager
            expireSessionsOnShutdown=false
            useDirtyFlag=false
            notifyListenersOnReplication=true
        </attribute>

        <reference name="Membership"> <moduleType>J2EEModule</moduleType> <name>TomcatMembership</name> </reference> 
        <reference name="Receiver"> <moduleType>J2EEModule</moduleType> <name>TomcatReceiver</name> </reference> 
        <reference name="Sender"> <moduleType>J2EEModule</moduleType> <name>TomcatSender</name> </reference> 
        <reference name="TomcatValveChain"> <moduleType>J2EEModule</moduleType> <name>ReplicationValve</name> </reference> 
        <!--
        <reference name="ClusterDeployer"> <moduleType>J2EEModule</moduleType> <name>FarmWarDeployer</name> </reference> 
        -->
    </gbean>

    <!-- Membership -->

    <gbean name="TomcatMembership" class="org.apache.geronimo.tomcat.cluster.MembershipServiceGBean">
        <attribute name="className">org.apache.catalina.cluster.mcast.McastService</attribute>
        <attribute name="initParams">
            mcastAddr=228.0.0.4
            mcastBindAddress=xx.yy.zz.aa
            mcastPort=45564
            mcastFrequency=500
            mcastDropTime=3000
        </attribute>
    </gbean> 

    <!-- Receiver -->

    <gbean name="TomcatReceiver"
        class="org.apache.geronimo.tomcat.cluster.ReceiverGBean">
        <attribute name="className">org.apache.catalina.cluster.tcp.ReplicationListener</attribute>
        <attribute name="initParams">
            tcpListenAddress=xx.yy.zz.aa
            tcpListenPort=4001
            tcpSelectorTimeout=100
            tcpThreadCount=6
        </attribute>
    </gbean>  

    <!-- Sender -->

    <gbean name="TomcatSender"
        class="org.apache.geronimo.tomcat.cluster.SenderGBean">
        <attribute name="className">org.apache.catalina.cluster.tcp.ReplicationTransmitter</attribute>
        <attribute name="initParams">
            replicationMode=pooled
            ackTimeout=15000
        </attribute>
    </gbean>   

    <!-- Valves -->
    <gbean name="ReplicationValve"
        class="org.apache.geronimo.tomcat.ValveGBean">
        <attribute name="className">org.apache.catalina.cluster.tcp.ReplicationValve</attribute>
        <attribute name="initParams">
            filter=.*\.gif;.*\.js;.*\.css;.*\.png;.*\.jpeg;.*\.jpg;.*\.htm;.*\.html;.*\.txt;
        </attribute>
    </gbean>    




    <!-- Deployer 
    <gbean name="FarmWarDeployer" class="org.apache.geronimo.tomcat.cluster.FarmWarDeployerGBean">
        <attribute name="tempDir">var/catalina/war-temp</attribute>
        <attribute name="deployDir">var/catalina/war-deploy</attribute>
        <attribute name="watchDir">var/catalina/war-listen</attribute>
        <attribute name="watchEnabled">true</attribute>
        <attribute name="processDeployFrequency">10</attribute> 
        <reference name="ServerInfo">
            <moduleType>J2EEModule</moduleType>
            <module>geronimo/j2ee-system/1.0-SNAPSHOT/car</module>
            <name>ServerInfo</name>
        </reference>
    </gbean>
    -->



</web-app>
