Enable for async requests
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 7 Jun 2011 22:14:52 +0000 (22:14 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 7 Jun 2011 22:14:52 +0000 (22:14 +0000)
Only look for a change on non-async requests. There will always be one of these before any async processing on a request so no need to check if the current request is in the middle of async processing

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

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

index 96aa7b4..6fe243e 100644 (file)
@@ -102,7 +102,7 @@ public class JvmRouteBinderValve extends ValveBase implements ClusterValve {
 
     //------------------------------------------------------ Constructor
     public JvmRouteBinderValve() {
-        super(false);
+        super(true);
     }
 
     /*--Instance Variables--------------------------------------*/
@@ -199,9 +199,10 @@ public class JvmRouteBinderValve extends ValveBase implements ClusterValve {
     public void invoke(Request request, Response response) throws IOException,
             ServletException {
 
-         if (getEnabled() 
-             && request.getContext() != null
-             && request.getContext().getDistributable() ) {
+         if (getEnabled() &&
+                 request.getContext() != null &&
+                 request.getContext().getDistributable() &&
+                 !request.isAsyncDispatching()) {
              // valve cluster can access manager - other cluster handle turnover 
              // at host level - hopefully!
              Manager manager = request.getContext().getManager();