Author: rjung
Date: Tue Sep  8 09:49:19 2009
New Revision: 812422

URL: http://svn.apache.org/viewvc?rev=812422&view=rev
Log:
Rewrite (reword) the Javadoc comment for JvmRouteBinderValve class.

Backport of r796592 from TC5.5.x and r795458 from TC6.0.x.

Modified:
    
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/JvmRouteBinderValve.java

Modified: 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/JvmRouteBinderValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/JvmRouteBinderValve.java?rev=812422&r1=812421&r2=812422&view=diff
==============================================================================
--- 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/JvmRouteBinderValve.java
 (original)
+++ 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/JvmRouteBinderValve.java
 Tue Sep  8 09:49:19 2009
@@ -45,41 +45,52 @@
 
 /**
  * Valve to handle Tomcat jvmRoute takeover using mod_jk module after node
- * failure. After a node crashed the next request going to other cluster node.
- * Now the answering from apache is slower ( make some error handshaking. Very
- * bad with apache at my windows.). We rewrite now the jsessionid
- * information to the backup cluster node. After the next response all client
- * request goes direct to the backup node. The change sessionid send also to 
all
- * other cluster nodes. Well, now the session stickyness work directly to the
- * backup node and traffic don't go back too restarted cluster nodes!
- * As jsessionid was created by cookie, the change JSESSIONID cookie resend 
with next response.
- *  
- * At all cluster node you must configure the as ClusterListener since 5.5.10
- * {...@link 
org.apache.catalina.cluster.session.JvmRouteSessionIDBinderListener 
JvmRouteSessionIDBinderListener}
- * or before with
- * 
org.apache.catalina.cluster.session.JvmRouteSessionIDBinderListenerLifecycle.
+ * failure. After a node crashes, subsequent requests go to other cluster 
nodes.
+ * That incurs a drop in performance. When this Valve is enabled on a backup
+ * node and sees a request, which was intended for another (thus failed) node,
+ * it will rewrite the cookie jsessionid information to use the route to this
+ * backup cluster node, that answered the request. After the response is
+ * delivered to the client, all subsequent client requests will go directly to
+ * the backup node. The change of sessionid is also sent to all other cluster
+ * nodes. After all that, the session stickyness will work directly to the
+ * backup node and the traffic will not go back to the failed node after it is
+ * restarted!
  * 
+ * <p>
+ * For this valve to function correctly, so that all nodes of the cluster
+ * receive the sessionid change notifications that it generates, the following
+ * ClusterListener MUST be configured at all nodes of the cluster:
+ * {...@link 
org.apache.catalina.cluster.session.JvmRouteSessionIDBinderListener
+ * JvmRouteSessionIDBinderListener} since Tomcat 5.5.10, and both
+ * JvmRouteSessionIDBinderListener and JvmRouteSessionIDBinderLifecycleListener
+ * for earlier versions of Tomcat.
+ * 
+ * <p>
  * Add this Valve to your host definition at conf/server.xml .
  * 
  * Since 5.5.10 as direct cluster valve:<br/>
+ * 
  * <pre>
  *  &lt;Cluster&gt;
  *  &lt;Valve 
className=&quot;org.apache.catalina.cluster.session.JvmRouteBinderValve&quot; 
/&gt;  
  *  &lt;/Cluster&gt;
  * </pre>
+ * 
  * <br />
  * Before 5.5.10 as Host element:<br/>
+ * 
  * <pre>
- *  &lt;Hostr&gt;
+ *  &lt;Host&gt;
  *  &lt;Valve 
className=&quot;org.apache.catalina.cluster.session.JvmRouteBinderValve&quot; 
/&gt;  
- *  &lt;/Hostr&gt;
+ *  &lt;/Host&gt;
  * </pre>
  * 
- * Trick:<br/>
- * You can enable this mod_jk turnover mode via JMX before you drop a node to 
all backup nodes!
- * Set enable true on all JvmRouteBinderValve backups, disable worker at 
mod_jk 
- * and then drop node and restart it! Then enable mod_jk Worker and disable 
JvmRouteBinderValves again. 
- * This use case means that only requested session are migrated.
+ * <em>A Trick:</em><br/>
+ * You can enable this mod_jk turnover mode via JMX before you drop a node to
+ * all backup nodes! Set enable true on all JvmRouteBinderValve backups, 
disable
+ * worker at mod_jk and then drop node and restart it! Then enable mod_jk 
worker
+ * and disable JvmRouteBinderValves again. This use case means that only
+ * requested sessions are migrated.
  * 
  * @author Peter Rossbach
  * @author Rainer Jung



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to