complete valve documentation
authorfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 13 Oct 2006 19:07:44 +0000 (19:07 +0000)
committerfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 13 Oct 2006 19:07:44 +0000 (19:07 +0000)
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
webapps/docs/config/cluster-valve.xml

index b1acbc9..c1730b8 100644 (file)
@@ -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()) {
index 76750b6..3916a9c 100644 (file)
         The filter uses regular expressions and each filter is delimited by a semi colon.
         <code>Pattern#compile(java.lang.String)</code>
       </attribute>
-      <attribute name="className" required="false">
+      <attribute name="primaryIndicator" required="false">
+        Boolean value, so to true, and the replication valve will insert a request attribute with the name
+        defined by the <code>primaryIndicatorName</code> attribute.
+        The value inserted into the request attribute is either <code>Boolean.TRUE</code> or 
+        <code>Boolean.FALSE</code>
       </attribute>
-      <attribute name="className" required="false">
+      <attribute name="primaryIndicatorName" required="false">
+        Default value is <code>org.apache.catalina.ha.tcp.isPrimarySession</code>
+        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.
       </attribute>
       <attribute name="statistics" required="false">
         Boolean value. Set to <code>true</code> if you want the valve to collect request statistics.
   <subsection name="Attributes">
     <attributes>
       <attribute name="className" required="true">
+        <code>org.apache.catalina.ha.session.JvmRouteBinderValve</code>
       </attribute>
+      <attribute name="enabled" required="false">
+        Default value is <code>true</code>
+        Runtime attribute to turn on and off turn over of the session's jvmRoute value.
+      </attribute>
+      
     </attributes>
   </subsection>
 </section>