tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1036882 - in /tomcat/trunk/java/org/apache/catalina/ha/session: JvmRouteBinderValve.java JvmRouteSessionIDBinderListener.java SessionIDMessage.java
Date Fri, 19 Nov 2010 15:00:32 GMT
Author: markt
Date: Fri Nov 19 15:00:32 2010
New Revision: 1036882

URL: http://svn.apache.org/viewvc?rev=1036882&view=rev
Log:
Parallel deployment
One more place where contexy.getPath() needs to be replaced with context.getName()

Modified:
    tomcat/trunk/java/org/apache/catalina/ha/session/JvmRouteBinderValve.java
    tomcat/trunk/java/org/apache/catalina/ha/session/JvmRouteSessionIDBinderListener.java
    tomcat/trunk/java/org/apache/catalina/ha/session/SessionIDMessage.java

Modified: tomcat/trunk/java/org/apache/catalina/ha/session/JvmRouteBinderValve.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/session/JvmRouteBinderValve.java?rev=1036882&r1=1036881&r2=1036882&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ha/session/JvmRouteBinderValve.java (original)
+++ tomcat/trunk/java/org/apache/catalina/ha/session/JvmRouteBinderValve.java Fri Nov 19 15:00:32
2010
@@ -416,7 +416,7 @@ public class JvmRouteBinderValve extends
             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);
         }

Modified: tomcat/trunk/java/org/apache/catalina/ha/session/JvmRouteSessionIDBinderListener.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/session/JvmRouteSessionIDBinderListener.java?rev=1036882&r1=1036881&r2=1036882&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ha/session/JvmRouteSessionIDBinderListener.java
(original)
+++ tomcat/trunk/java/org/apache/catalina/ha/session/JvmRouteSessionIDBinderListener.java
Fri Nov 19 15:00:32 2010
@@ -128,7 +128,7 @@ public class JvmRouteSessionIDBinderList
                         "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 JvmRouteSessionIDBinderList
             }
             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 JvmRouteSessionIDBinderList
                         } 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;
     }

Modified: tomcat/trunk/java/org/apache/catalina/ha/session/SessionIDMessage.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/session/SessionIDMessage.java?rev=1036882&r1=1036881&r2=1036882&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ha/session/SessionIDMessage.java (original)
+++ tomcat/trunk/java/org/apache/catalina/ha/session/SessionIDMessage.java Fri Nov 19 15:00:32
2010
@@ -36,7 +36,7 @@ public class SessionIDMessage extends Cl
     private String backupSessionID;
 
     private String host ;
-    private String contextPath;
+    private String contextName;
 
     @Override
     public String getUniqueId() {
@@ -44,7 +44,7 @@ public class SessionIDMessage extends Cl
         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 Cl
     }
     
     /**
-     * @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 Cl
 
     @Override
     public String toString() {
-        return "SESSIONID-UPDATE#" + getHost() + "." + getContextPath() + "#" + getOrignalSessionID()
+ ":" + getBackupSessionID();
+        return "SESSIONID-UPDATE#" + getHost() + "." + getContextName() + "#" + getOrignalSessionID()
+ ":" + getBackupSessionID();
     }
 
 }



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


Mime
View raw message