Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@apache.org Received: (qmail 15314 invoked from network); 3 Apr 2003 02:29:51 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 3 Apr 2003 02:29:51 -0000 Received: (qmail 8373 invoked by uid 97); 3 Apr 2003 02:31:48 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-dev@nagoya.betaversion.org Received: (qmail 8366 invoked from network); 3 Apr 2003 02:31:47 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 3 Apr 2003 02:31:47 -0000 Received: (qmail 14424 invoked by uid 500); 3 Apr 2003 02:29:40 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 14411 invoked by uid 500); 3 Apr 2003 02:29:39 -0000 Received: (qmail 14408 invoked from network); 3 Apr 2003 02:29:39 -0000 Received: from icarus.apache.org (208.185.179.13) by daedalus.apache.org with SMTP; 3 Apr 2003 02:29:39 -0000 Received: (qmail 78731 invoked by uid 1602); 3 Apr 2003 02:29:38 -0000 Date: 3 Apr 2003 02:29:38 -0000 Message-ID: <20030403022938.78730.qmail@icarus.apache.org> From: fhanik@apache.org To: jakarta-tomcat-catalina-cvs@apache.org Subject: cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp ReplicationListener.java SimpleTcpCluster.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N fhanik 2003/04/02 18:29:38 Modified: modules/cluster/etc cluster-server.xml modules/cluster/src/share/org/apache/catalina/cluster/tcp ReplicationListener.java SimpleTcpCluster.java Log: added in the host auto flag, and fixed the select timeout from 4.1.x branch Revision Changes Path 1.2 +35 -28 jakarta-tomcat-catalina/modules/cluster/etc/cluster-server.xml Index: cluster-server.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/etc/cluster-server.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- cluster-server.xml 22 Feb 2003 00:46:22 -0000 1.1 +++ cluster-server.xml 3 Apr 2003 02:29:38 -0000 1.2 @@ -231,23 +231,29 @@ tcpThreadCount = the number of threads to handle incoming replication requests, optimal would be the same amount of threads as nodes - tcpListenAddress = the listen address (bind address) for TCP cluster request on this host, in case of multiple ethernet cards + tcpListenAddress = the listen address (bind address) for TCP cluster request on this host, + in case of multiple ethernet cards. + auto means that address becomes + InetAddress.getLocalHost().getHostAddress() tcpListenPort = the tcp listen port + + tcpSelectorTimeout = the timeout (ms) for the Selector.select() method in case the OS + has a wakup bug in java.nio. Set to 0 for no timeout printToScreen = true means that managers will also print to std.out expireSessionsOnShutdown = true means that useDirtyFlag = true means that we only replicate a session after setAttribute,removeAttribute has been called. - false means to replicate the session after each request. - false means that replication would work for the following piece of code: - <% - HashMap map = new HashMap(); - session.setAttribute("map",map); - map.put("key","value"); - %> - --> + false means to replicate the session after each request. + false means that replication would work for the following piece of code: + <% + HashMap map = new HashMap(); + session.setAttribute("map",map); + map.put("key","value"); + %> + --> - + When configuring for clustering, you also add in a valve to catch all the requests + coming in, at the end of the request, the session may or may not be replicated. + A session is replicated if and only if all the conditions are met: + 1. useDirtyFlag is true or setAttribute or removeAttribute has been called AND + 2. a session exists (has been created) + 3. the request is not trapped by the "filter" attribute + + The filter attribute is to filter out requests that could not modify the session, + hence we don't replicate the session after the end of this request. + The filter is negative, ie, anything you put in the filter, you mean to filter out, + ie, no replication will be done on requests that match one of the filters. + The filter attribute is delimited by ;, so you can't escape out ; even if you wanted to. + + filter=".*\.gif;.*\.js;" means that we will not replicate the session after requests with the URI + ending with .gif and .js are intercepted. + --> + + filter=".*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;"/>