Parallel deployment
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 19 Nov 2010 15:00:32 +0000 (15:00 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 19 Nov 2010 15:00:32 +0000 (15:00 +0000)
One more place where contexy.getPath() needs to be replaced with context.getName()

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

java/org/apache/catalina/ha/session/JvmRouteBinderValve.java
java/org/apache/catalina/ha/session/JvmRouteSessionIDBinderListener.java
java/org/apache/catalina/ha/session/SessionIDMessage.java

index 8cb5928..699cd0e 100644 (file)
@@ -416,7 +416,7 @@ public class JvmRouteBinderValve extends ValveBase implements ClusterValve {
             msg.setOrignalSessionID(sessionId);
             msg.setBackupSessionID(newSessionID);
             Context context = request.getContext();
-            msg.setContextPath(context.getPath());
+            msg.setContextName(context.getName());
             msg.setHost(context.getParent().getName());
             c.send(msg);
         }
index 880d336..0836a08 100644 (file)
@@ -128,7 +128,7 @@ public class JvmRouteSessionIDBinderListener extends ClusterListener {
                         "jvmRoute.receiveMessage.sessionIDChanged", sessionmsg
                                 .getOrignalSessionID(), sessionmsg
                                 .getBackupSessionID(), sessionmsg
-                                .getContextPath()));
+                                .getContextName()));
             Container container = getCluster().getContainer();
             Container host = null ;
             if(container instanceof Engine) {
@@ -138,7 +138,7 @@ public class JvmRouteSessionIDBinderListener extends ClusterListener {
             }
             if (host != null) {
                 Context context = (Context) host.findChild(sessionmsg
-                        .getContextPath());
+                        .getContextName());
                 if (context != null) {
                     try {
                         Session session = context.getManager().findSession(
@@ -148,17 +148,17 @@ public class JvmRouteSessionIDBinderListener extends ClusterListener {
                         } else if (log.isInfoEnabled())
                             log.info(sm.getString("jvmRoute.lostSession",
                                     sessionmsg.getOrignalSessionID(),
-                                    sessionmsg.getContextPath()));
+                                    sessionmsg.getContextName()));
                     } catch (IOException e) {
                         log.error(e);
                     }
 
                 } else if (log.isErrorEnabled())
                     log.error(sm.getString("jvmRoute.contextNotFound",
-                            sessionmsg.getContextPath(), ((StandardEngine) host
+                            sessionmsg.getContextName(), ((StandardEngine) host
                                     .getParent()).getJvmRoute()));
             } else if (log.isErrorEnabled())
-                log.error(sm.getString("jvmRoute.hostNotFound", sessionmsg.getContextPath()));
+                log.error(sm.getString("jvmRoute.hostNotFound", sessionmsg.getContextName()));
         }
         return;
     }
index 9eae613..4aa0746 100644 (file)
@@ -36,7 +36,7 @@ public class SessionIDMessage extends ClusterMessageBase {
     private String backupSessionID;
 
     private String host ;
-    private String contextPath;
+    private String contextName;
 
     @Override
     public String getUniqueId() {
@@ -44,7 +44,7 @@ public class SessionIDMessage extends ClusterMessageBase {
         result.append("#-#");
         result.append(getHost());
                 result.append("#-#");
-                result.append(getContextPath());
+                result.append(getContextName());
         result.append("#-#");
         result.append(getMessageNumber());
         result.append("#-#");
@@ -67,16 +67,16 @@ public class SessionIDMessage extends ClusterMessageBase {
     }
     
     /**
-     * @return Returns the contextPath.
+     * @return Returns the context name.
      */
-    public String getContextPath() {
-        return contextPath;
+    public String getContextName() {
+        return contextName;
     }
     /**
-     * @param contextPath The contextPath to set.
+     * @param contextName The context name to set.
      */
-    public void setContextPath(String contextPath) {
-        this.contextPath = contextPath;
+    public void setContextName(String contextName) {
+        this.contextName = contextName;
     }
     /**
      * @return Returns the messageNumber.
@@ -126,7 +126,7 @@ public class SessionIDMessage extends ClusterMessageBase {
 
     @Override
     public String toString() {
-        return "SESSIONID-UPDATE#" + getHost() + "." + getContextPath() + "#" + getOrignalSessionID() + ":" + getBackupSessionID();
+        return "SESSIONID-UPDATE#" + getHost() + "." + getContextName() + "#" + getOrignalSessionID() + ":" + getBackupSessionID();
     }
 
 }