Author: kkolinko
Date: Wed Oct 26 18:55:56 2011
New Revision: 1189382

URL: http://svn.apache.org/viewvc?rev=1189382&view=rev
Log:
Avoid an unnecessary session ID change notice. 
Notice of changed session ID by JvmRouteBinderValve is unnecessary to 
BackupManager. 
In BackupManager, change of session ID is replicated by the call of a setId() 
method.

There is one difference comparing to TC7: there is no "if (c != null)" check, 
because getCluster()!=null is checked before calling the method, see r1026795.

Modified:
    tomcat/tc6.0.x/trunk/STATUS.txt
    
tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/JvmRouteBinderValve.java
    tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1189382&r1=1189381&r2=1189382&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Oct 26 18:55:56 2011
@@ -72,14 +72,6 @@ PATCHES PROPOSED TO BACKPORT:
   +1: kkolinko, markt
   -1:
 
-* Avoid an unnecessary session ID change notice. 
-  Notice of changed session ID by JvmRouteBinderValve is unnecessary to 
BackupManager. 
-  In BackupManager, change of session ID is replicated by the call of a 
setId() method. 
-  http://svn.apache.org/viewvc?view=revision&revision=1186632
-  http://svn.apache.org/viewvc?view=revision&revision=1187152
-  +1: kfujino, markt, kkolinko
-  -1:
-
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52059
   http://svn.apache.org/viewvc?rev=1186763&view=rev
   Fix a typo in Windows uninstaller:

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/JvmRouteBinderValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/JvmRouteBinderValve.java?rev=1189382&r1=1189381&r2=1189382&view=diff
==============================================================================
--- 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/JvmRouteBinderValve.java
 (original)
+++ 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/JvmRouteBinderValve.java
 Wed Oct 26 18:55:56 2011
@@ -426,16 +426,19 @@ public class JvmRouteBinderValve extends
      */
     protected void sendSessionIDClusterBackup(ClusterManager manager,Request 
request,String sessionId,
             String newSessionID) {
-        SessionIDMessage msg = new SessionIDMessage();
-        msg.setOrignalSessionID(sessionId);
-        msg.setBackupSessionID(newSessionID);
-        Context context = request.getContext();
-        msg.setContextPath(context.getPath());
-        msg.setHost(context.getParent().getName());
-        if(manager.doDomainReplication())
-            cluster.sendClusterDomain(msg);
-        else
-            cluster.send(msg);
+        if (!(getManager(request) instanceof BackupManager)) {
+            SessionIDMessage msg = new SessionIDMessage();
+            msg.setOrignalSessionID(sessionId);
+            msg.setBackupSessionID(newSessionID);
+            Context context = request.getContext();
+            msg.setContextPath(context.getPath());
+            msg.setHost(context.getParent().getName());
+            if(manager.doDomainReplication()) {
+                cluster.sendClusterDomain(msg);
+            } else {
+                cluster.send(msg);
+            }
+        }
     }
 
     /**

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=1189382&r1=1189381&r2=1189382&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Wed Oct 26 18:55:56 2011
@@ -143,6 +143,12 @@
         allows to filter which session attributes are replicated using a
         regular expression applied to the attribute name. (rjung)
       </add>
+      <fix>
+        Avoid an unnecessary session ID change notice. 
+        Notice of changed session ID by JvmRouteBinderValve is unnecessary to 
+        BackupManager. In BackupManager, change of session ID is replicated by 
+        the call of a setId() method. (kfujino)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Webapps">



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

Reply via email to