Ignore:
Timestamp:
2005-05-16T11:02:50+12:00 (19 years ago)
Author:
kjdon
Message:

merged from branch ant-install-branch: merge 1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/comms/jakarta/server.xml.in

    r7971 r9874  
    1 <!-- Alternate Example-less Configuration File -->
     1<!-- Example Server Configuration File -->
    22<!-- Note that component elements are nested corresponding to their
    33     parent-child relationships with each other -->
     
    1111 -->
    1212
    13 <Server port="8005" shutdown="SHUTDOWN" debug="0">
    14 
    15 
    16   <!-- Uncomment this entry to enable JMX MBeans support -->
    17 <!--
    18   <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
    19                 debug="0" port="-1" login="admin" password="admin"/>
    20 -->
    21 
     13<Server port="8005" shutdown="SHUTDOWN">
     14
     15  <!-- Comment these entries out to disable JMX MBeans support used for the
     16       administration web application -->
     17  <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
     18  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
     19  <Listener className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>
     20
     21  <!-- Global JNDI resources -->
     22  <GlobalNamingResources>
     23
     24    <!-- Test entry for demonstration purposes -->
     25    <Environment name="simpleValue" type="java.lang.Integer" value="30"/>
     26
     27    <!-- Editable user database that can also be used by
     28         UserDatabaseRealm to authenticate users -->
     29    <Resource name="UserDatabase" auth="Container"
     30              type="org.apache.catalina.UserDatabase"
     31       description="User database that can be updated and saved"
     32           factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
     33          pathname="conf/tomcat-users.xml" />
     34
     35  </GlobalNamingResources>
    2236
    2337  <!-- A "Service" is a collection of one or more "Connectors" that share
     
    3145
    3246  <!-- Define the Tomcat Stand-Alone Service -->
    33   <Service name="Tomcat-Standalone">
     47  <Service name="Catalina">
    3448
    3549    <!-- A "Connector" represents an endpoint by which requests are received
     
    4155         following the instructions below and uncommenting the second Connector
    4256         entry.  SSL support requires the following steps (see the SSL Config
    43          HOWTO in the Tomcat 4.0 documentation bundle for more detailed
     57         HOWTO in the Tomcat 5 documentation bundle for more detailed
    4458         instructions):
    45          * Download and install JSSE 1.0.2 or later, and put the JAR files
    46            into "$JAVA_HOME/jre/lib/ext".
     59         * If your JDK version 1.3 or prior, download and install JSSE 1.0.2 or
     60           later, and put the JAR files into "$JAVA_HOME/jre/lib/ext".
    4761         * Execute:
    4862             %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)
     
    6074
    6175    <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
    62     <Connector className="org.apache.catalina.connector.http.HttpConnector"
    63                port="8080" minProcessors="5" maxProcessors="75"
    64                enableLookups="true" redirectPort="8443"
    65                acceptCount="10" debug="0" connectionTimeout="60000"/>
    66     <!-- Note : To disable connection timeouts, set connectionTimeout value
    67      to -1 -->
    68 
    69     <!-- Define an SSL HTTP/1.1 Connector on port 8443 -->
     76    <Connector port="@port@"
     77               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
     78               enableLookups="false" redirectPort="8443" acceptCount="100"
     79               connectionTimeout="20000" disableUploadTimeout="true" />
     80    <!-- Note : To disable connection timeouts, set connectionTimeout value
     81     to 0 -->
     82   
     83    <!-- Note : To use gzip compression you could set the following properties :
     84   
     85               compression="on"
     86               compressionMinSize="2048"
     87               noCompressionUserAgents="gozilla, traviata"
     88               compressableMimeType="text/html,text/xml"
     89    -->
     90
     91    <!-- Define a SSL HTTP/1.1 Connector on port 8443 -->
    7092    <!--
    71     <Connector className="org.apache.catalina.connector.http.HttpConnector"
    72                port="8443" minProcessors="5" maxProcessors="75"
    73                enableLookups="true"
    74            acceptCount="10" debug="0" scheme="https" secure="true">
    75       <Factory className="org.apache.catalina.net.SSLServerSocketFactory"
    76                clientAuth="false" protocol="TLS"/>
    77     </Connector>
     93    <Connector port="8443"
     94               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
     95               enableLookups="false" disableUploadTimeout="true"
     96               acceptCount="100" scheme="https" secure="true"
     97               clientAuth="false" sslProtocol="TLS" />
    7898    -->
    7999
    80100    <!-- Define an AJP 1.3 Connector on port 8009 -->
    81     <!--
    82     <Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
    83                port="8009" minProcessors="5" maxProcessors="75"
    84                acceptCount="10" debug="0"/>
    85     -->
    86 
    87     <!-- Define a Proxied HTTP/1.1 Connector on port 8081 -->
     101    <Connector port="8009"
     102               enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
     103
     104    <!-- Define a Proxied HTTP/1.1 Connector on port 8082 -->
    88105    <!-- See proxy documentation for more information about using this. -->
    89106    <!--
    90     <Connector className="org.apache.catalina.connector.http.HttpConnector"
    91                port="8081" minProcessors="5" maxProcessors="75"
    92                enableLookups="true"
    93                acceptCount="10" debug="0" connectionTimeout="60000"
    94                proxyPort="80"/>
    95     -->
    96 
    97     <!-- Define a non-SSL HTTP/1.0 Test Connector on port 8082 -->
    98     <!--
    99     <Connector className="org.apache.catalina.connector.http10.HttpConnector"
    100                port="8082" minProcessors="5" maxProcessors="75"
    101                enableLookups="true" redirectPort="8443"
    102                acceptCount="10" debug="0"/>
     107    <Connector port="8082"
     108               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
     109               enableLookups="false" acceptCount="100" connectionTimeout="20000"
     110               proxyPort="80" disableUploadTimeout="true" />
    103111    -->
    104112
     
    108116         on to the appropriate Host (virtual host). -->
    109117
     118    <!-- You should set jvmRoute to support load-balancing via AJP ie :
     119    <Engine name="Standalone" defaultHost="localhost" jvmRoute="jvm1">         
     120    -->
     121         
    110122    <!-- Define the top level container in our container hierarchy -->
    111     <Engine name="Standalone" defaultHost="localhost" debug="0">
     123    <Engine name="Catalina" defaultHost="localhost">
    112124
    113125      <!-- The request dumper valve dumps useful debugging information about
     
    118130           element inside the corresponding <Host> or <Context> entry instead.
    119131
    120            For a similar mechanism that is portable to all Servlet 2.3
     132           For a similar mechanism that is portable to all Servlet 2.4
    121133           containers, check out the "RequestDumperFilter" Filter in the
    122134           example application (the source for this filter may be found in
     
    129141      -->
    130142
    131       <!-- Global logger unless overridden at lower levels -->
    132       <Logger className="org.apache.catalina.logger.FileLogger"
    133               prefix="catalina_log." suffix=".txt"
    134               timestamp="true"/>
    135 
    136143      <!-- Because this Realm is here, an instance will be shared globally -->
    137144
     145      <!-- This Realm uses the UserDatabase configured in the global JNDI
     146           resources under the key "UserDatabase".  Any edits
     147           that are performed against this UserDatabase are immediately
     148           available for use by the Realm.  -->
     149      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
     150             resourceName="UserDatabase"/>
     151
     152      <!-- Comment out the old realm but leave here for now in case we
     153           need to go back quickly -->
     154      <!--
    138155      <Realm className="org.apache.catalina.realm.MemoryRealm" />
     156      -->
    139157
    140158      <!-- Replace the above Realm with one of the following to get a Realm
     
    142160
    143161      <!--
    144       <Realm  className="org.apache.catalina.realm.JDBCRealm" debug="99"
     162      <Realm  className="org.apache.catalina.realm.JDBCRealm"
    145163             driverName="org.gjt.mm.mysql.Driver"
    146164          connectionURL="jdbc:mysql://localhost/authority"
     
    151169
    152170      <!--
    153       <Realm  className="org.apache.catalina.realm.JDBCRealm" debug="99"
     171      <Realm  className="org.apache.catalina.realm.JDBCRealm"
    154172             driverName="oracle.jdbc.driver.OracleDriver"
    155173          connectionURL="jdbc:oracle:thin:@ntserver:1521:ORCL"
     
    160178
    161179      <!--
    162       <Realm  className="org.apache.catalina.realm.JDBCRealm" debug="99"
     180      <Realm  className="org.apache.catalina.realm.JDBCRealm"
    163181             driverName="sun.jdbc.odbc.JdbcOdbcDriver"
    164182          connectionURL="jdbc:odbc:CATALINA"
     
    167185      -->
    168186
    169       <!-- Define the default virtual host -->
    170       <Host name="localhost" debug="0" appBase="webapps"
    171        unpackWARs="true" autoDeploy="true">
     187      <!-- Define the default virtual host
     188           Note: XML Schema validation will not work with Xerces 2.2.
     189       -->
     190      <Host name="localhost" appBase="webapps"
     191       unpackWARs="true" autoDeploy="true"
     192       xmlValidation="false" xmlNamespaceAware="false">
     193
     194    <!-- GSDL3 Service -->
     195    <Context path="/gsdl3" docBase="@gsdl3home@/web" debug="1" reloadable="true"><Resources allowLinking='true'/></Context>
     196   
     197        <!-- Defines a cluster for this node,
     198             By defining this element, means that every manager will be changed.
     199             So when running a cluster, only make sure that you have webapps in there
     200             that need to be clustered and remove the other ones.
     201             A cluster has the following parameters:
     202
     203             className = the fully qualified name of the cluster class
     204
     205             name = a descriptive name for your cluster, can be anything
     206
     207             mcastAddr = the multicast address, has to be the same for all the nodes
     208
     209             mcastPort = the multicast port, has to be the same for all the nodes
     210             
     211             mcastBindAddr = bind the multicast socket to a specific address
     212             
     213             mcastTTL = the multicast TTL if you want to limit your broadcast
     214             
     215             mcastSoTimeout = the multicast readtimeout
     216
     217             mcastFrequency = the number of milliseconds in between sending a "I'm alive" heartbeat
     218
     219             mcastDropTime = the number a milliseconds before a node is considered "dead" if no heartbeat is received
     220
     221             tcpThreadCount = the number of threads to handle incoming replication requests, optimal would be the same amount of threads as nodes
     222
     223             tcpListenAddress = the listen address (bind address) for TCP cluster request on this host,
     224                                in case of multiple ethernet cards.
     225                                auto means that address becomes
     226                                InetAddress.getLocalHost().getHostAddress()
     227
     228             tcpListenPort = the tcp listen port
     229
     230             tcpSelectorTimeout = the timeout (ms) for the Selector.select() method in case the OS
     231                                  has a wakup bug in java.nio. Set to 0 for no timeout
     232
     233             printToScreen = true means that managers will also print to std.out
     234
     235             expireSessionsOnShutdown = true means that
     236
     237             useDirtyFlag = true means that we only replicate a session after setAttribute,removeAttribute has been called.
     238                            false means to replicate the session after each request.
     239                            false means that replication would work for the following piece of code: (only for SimpleTcpReplicationManager)
     240                            <%
     241                            HashMap map = (HashMap)session.getAttribute("map");
     242                            map.put("key","value");
     243                            %>
     244             replicationMode = can be either 'pooled', 'synchronous' or 'asynchronous'.
     245                               * Pooled means that the replication happens using several sockets in a synchronous way. Ie, the data gets replicated, then the request return. This is the same as the 'synchronous' setting except it uses a pool of sockets, hence it is multithreaded. This is the fastest and safest configuration. To use this, also increase the nr of tcp threads that you have dealing with replication.
     246                               * Synchronous means that the thread that executes the request, is also the
     247                               thread the replicates the data to the other nodes, and will not return until all
     248                               nodes have received the information.
     249                               * Asynchronous means that there is a specific 'sender' thread for each cluster node,
     250                               so the request thread will queue the replication request into a "smart" queue,
     251                               and then return to the client.
     252                               The "smart" queue is a queue where when a session is added to the queue, and the same session
     253                               already exists in the queue from a previous request, that session will be replaced
     254                               in the queue instead of replicating two requests. This almost never happens, unless there is a
     255                               large network delay.
     256        -->             
     257        <!--
     258            When configuring for clustering, you also add in a valve to catch all the requests
     259            coming in, at the end of the request, the session may or may not be replicated.
     260            A session is replicated if and only if all the conditions are met:
     261            1. useDirtyFlag is true or setAttribute or removeAttribute has been called AND
     262            2. a session exists (has been created)
     263            3. the request is not trapped by the "filter" attribute
     264
     265            The filter attribute is to filter out requests that could not modify the session,
     266            hence we don't replicate the session after the end of this request.
     267            The filter is negative, ie, anything you put in the filter, you mean to filter out,
     268            ie, no replication will be done on requests that match one of the filters.
     269            The filter attribute is delimited by ;, so you can't escape out ; even if you wanted to.
     270
     271            filter=".*\.gif;.*\.js;" means that we will not replicate the session after requests with the URI
     272            ending with .gif and .js are intercepted.
     273           
     274            The deployer element can be used to deploy apps cluster wide.
     275            Currently the deployment only deploys/undeploys to working members in the cluster
     276            so no WARs are copied upons startup of a broken node.
     277            The deployer watches a directory (watchDir) for WAR files when watchEnabled="true"
     278            When a new war file is added the war gets deployed to the local instance,
     279            and then deployed to the other instances in the cluster.
     280            When a war file is deleted from the watchDir the war is undeployed locally
     281            and cluster wide
     282        -->
     283       
     284        <!--
     285        <Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
     286                 managerClassName="org.apache.catalina.cluster.session.DeltaManager"
     287                 expireSessionsOnShutdown="false"
     288                 useDirtyFlag="true"
     289                 notifyListenersOnReplication="true">
     290
     291            <Membership
     292                className="org.apache.catalina.cluster.mcast.McastService"
     293                mcastAddr="228.0.0.4"
     294                mcastPort="45564"
     295                mcastFrequency="500"
     296                mcastDropTime="3000"/>
     297
     298            <Receiver
     299                className="org.apache.catalina.cluster.tcp.ReplicationListener"
     300                tcpListenAddress="auto"
     301                tcpListenPort="4001"
     302                tcpSelectorTimeout="100"
     303                tcpThreadCount="6"/>
     304
     305            <Sender
     306                className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
     307                replicationMode="pooled"
     308                ackTimeout="15000"/>
     309
     310            <Valve className="org.apache.catalina.cluster.tcp.ReplicationValve"
     311                   filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;"/>
     312                   
     313            <Deployer className="org.apache.catalina.cluster.deploy.FarmWarDeployer"
     314                      tempDir="/tmp/war-temp/"
     315                      deployDir="/tmp/war-deploy/"
     316                      watchDir="/tmp/war-listen/"
     317                      watchEnabled="false"/>
     318        </Cluster>
     319        -->       
     320
     321
    172322
    173323        <!-- Normally, users must authenticate themselves to each web app
     
    178328             in this virtual host. -->
    179329        <!--
    180         <Valve className="org.apache.catalina.authenticator.SingleSignOn"
    181                    debug="0"/>
     330        <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
    182331        -->
    183332
     
    188337             (to $CATALINA_HOME) or absolute path to the desired directory.
    189338        -->
     339        <!--
    190340        <Valve className="org.apache.catalina.valves.AccessLogValve"
    191341                 directory="logs"  prefix="localhost_access_log." suffix=".txt"
    192                  pattern="common"/>
    193 
    194         <!-- Logger shared by all Contexts related to this virtual host.  By
    195              default (when using FileLogger), log files are created in the "logs"
    196              directory relative to $CATALINA_HOME.  If you wish, you can specify
    197              a different directory with the "directory" attribute.  Specify either a
    198              relative (to $CATALINA_HOME) or absolute path to the desired
    199              directory.-->
    200         <Logger className="org.apache.catalina.logger.FileLogger"
    201                  directory="logs"  prefix="localhost_log." suffix=".txt"
    202             timestamp="true"/>
    203 
    204         <!-- Define properties for each web application.  This is only needed
    205              if you want to set non-default properties, or have web application
    206              document roots in places other than the virtual host's appBase
    207              directory.  -->
    208 
    209         <!-- Tomcat Root Context -->
    210         <!--
    211           <Context path="" docBase="ROOT" debug="0"/>
    212         -->
    213 
    214     <!-- GSDL3 Service -->
    215         <Context path="/gsdl3" docBase="@gsdl3home@/web" debug="1" reloadable="true">
    216       <Resources allowLinking='true'/>
    217         </Context>
    218 
    219     <!-- SOAP Service -->
    220     <Context path="/soap" docBase="@gsdl3home@/comms/soap/soap/webapps/soap" debug="1" reloadable="true"/>
     342                 pattern="common" resolveHosts="false"/>
     343        -->
     344
     345        <!-- Access log processes all requests for this virtual host.  By
     346             default, log files are created in the "logs" directory relative to
     347             $CATALINA_HOME.  If you wish, you can specify a different
     348             directory with the "directory" attribute.  Specify either a relative
     349             (to $CATALINA_HOME) or absolute path to the desired directory.
     350             This access log implementation is optimized for maximum performance,
     351             but is hardcoded to support only the "common" and "combined" patterns.
     352        -->
     353        <!--
     354        <Valve className="org.apache.catalina.valves.FastCommonAccessLogValve"
     355                 directory="logs"  prefix="localhost_access_log." suffix=".txt"
     356                 pattern="common" resolveHosts="false"/>
     357        -->
     358        <!-- Access log processes all requests for this virtual host.  By
     359             default, log files are created in the "logs" directory relative to
     360             $CATALINA_HOME.  If you wish, you can specify a different
     361             directory with the "directory" attribute.  Specify either a relative
     362             (to $CATALINA_HOME) or absolute path to the desired directory.
     363             This access log implementation is optimized for maximum performance,
     364             but is hardcoded to support only the "common" and "combined" patterns.
     365
     366             This valve use NIO direct Byte Buffer to asynchornously store the
     367             log.
     368        -->
     369        <!--
     370        <Valve className="org.apache.catalina.valves.ByteBufferAccessLogValve"
     371                 directory="logs"  prefix="localhost_access_log." suffix=".txt"
     372                 pattern="common" resolveHosts="false"/>
     373        -->
    221374
    222375      </Host>
     
    226379  </Service>
    227380
    228   <!-- The MOD_WEBAPP connector is used to connect Apache 1.3 with Tomcat 4.0
    229        as its servlet container. Please read the README.txt file coming with
    230        the WebApp Module distribution on how to build it.
    231        (Or check out the "jakarta-tomcat-connectors/webapp" CVS repository)
    232 
    233        To configure the Apache side, you must ensure that you have the
    234        "ServerName" and "Port" directives defined in "httpd.conf".  Then,
    235        lines like these to the bottom of your "httpd.conf" file:
    236 
    237          LoadModule webapp_module libexec/mod_webapp.so
    238          WebAppConnection warpConnection warp localhost:8008
    239          WebAppDeploy examples warpConnection /examples/
    240 
    241        The next time you restart Apache (after restarting Tomcat, if needed)
    242        the connection will be established, and all applications you make
    243        visible via "WebAppDeploy" directives can be accessed through Apache.
    244   -->
    245 
    246   <!-- Define an Apache-Connector Service -->
    247   <Service name="Tomcat-Apache">
    248 
    249     <Connector className="org.apache.catalina.connector.warp.WarpConnector"
    250      port="8008" minProcessors="5" maxProcessors="75"
    251      enableLookups="true"
    252      acceptCount="10" debug="0"/>
    253 
    254     <!-- Replace "localhost" with what your Apache "ServerName" is set to -->
    255     <Engine className="org.apache.catalina.connector.warp.WarpEngine"
    256      name="Apache" debug="0" appBase="webapps">
    257 
    258       <!-- Global logger unless overridden at lower levels -->
    259       <Logger className="org.apache.catalina.logger.FileLogger"
    260               prefix="apache_log." suffix=".txt"
    261               timestamp="true"/>
    262 
    263       <!-- Because this Realm is here, an instance will be shared globally -->
    264       <Realm className="org.apache.catalina.realm.MemoryRealm" />
    265 
    266     </Engine>
    267 
    268   </Service>
    269 
    270381</Server>
    271 
Note: See TracChangeset for help on using the changeset viewer.