Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50503.
authorkfujino <kfujino@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 21 Dec 2010 06:56:09 +0000 (06:56 +0000)
committerkfujino <kfujino@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 21 Dec 2010 06:56:09 +0000 (06:56 +0000)
When web application has a version, Engine level Clustering works correctly.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1051392 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java
webapps/docs/changelog.xml

index 74f09fc..ae1b8c5 100644 (file)
@@ -592,8 +592,10 @@ public class SimpleTcpCluster extends LifecycleBase
             Container context = manager.getContainer() ;
             if(context != null && context instanceof Context) {
                 Container host = ((Context)context).getParent();
-                if(host != null && host instanceof Host && clusterName!=null && !(clusterName.indexOf("#")>=0))
+                if(host != null && host instanceof Host && clusterName!=null && 
+                        !(clusterName.startsWith(host.getName() +"#"))) {
                     clusterName = host.getName() +"#" + clusterName ;
+                }
             }
         }
         return clusterName;
index b19926a..d38bc1d 100644 (file)
         node is the only node in the cluster. Log requesting session data as
         INFO rather than WARNING. (markt)
       </fix>
+      <fix>
+        <bug>50503</bug>: When web application has a version, Engine level 
+        Clustering works correctly. (kfujino)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Web applications">