From e9e736aac160d311e6c999390257dd76a41cbff5 Mon Sep 17 00:00:00 2001 From: fhanik Date: Fri, 13 Oct 2006 19:07:44 +0000 Subject: [PATCH] complete valve documentation git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@463780 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/catalina/ha/tcp/ReplicationValve.java | 5 ++--- webapps/docs/config/cluster-valve.xml | 17 +++++++++++++++-- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/java/org/apache/catalina/ha/tcp/ReplicationValve.java b/java/org/apache/catalina/ha/tcp/ReplicationValve.java index b1acbc964..c1730b83b 100644 --- a/java/org/apache/catalina/ha/tcp/ReplicationValve.java +++ b/java/org/apache/catalina/ha/tcp/ReplicationValve.java @@ -634,12 +634,11 @@ public class ReplicationValve if (session instanceof ClusterSession) { ClusterSession cses = (ClusterSession) session; if (cses != null) { - Boolean isPrimary = new Boolean(cses.isPrimarySession()); if (log.isDebugEnabled()) log.debug(sm.getString( "ReplicationValve.session.indicator", request.getContext().getName(),id, - primaryIndicatorName, isPrimary)); - request.setAttribute(primaryIndicatorName, isPrimary); + primaryIndicatorName, cses.isPrimarySession())); + request.setAttribute(primaryIndicatorName, cses.isPrimarySession()?Boolean.TRUE:Boolean.FALSE); } } else { if (log.isDebugEnabled()) { diff --git a/webapps/docs/config/cluster-valve.xml b/webapps/docs/config/cluster-valve.xml index 76750b696..3916a9c73 100644 --- a/webapps/docs/config/cluster-valve.xml +++ b/webapps/docs/config/cluster-valve.xml @@ -43,9 +43,16 @@ The filter uses regular expressions and each filter is delimited by a semi colon. Pattern#compile(java.lang.String) - + + Boolean value, so to true, and the replication valve will insert a request attribute with the name + defined by the primaryIndicatorName attribute. + The value inserted into the request attribute is either Boolean.TRUE or + Boolean.FALSE - + + Default value is org.apache.catalina.ha.tcp.isPrimarySession + The value defined here is the name of the request attribute that contains the boolean value + if the session is primary on this server or not. Boolean value. Set to true if you want the valve to collect request statistics. @@ -63,7 +70,13 @@ + org.apache.catalina.ha.session.JvmRouteBinderValve + + Default value is true + Runtime attribute to turn on and off turn over of the session's jvmRoute value. + + -- 2.11.0