[jboss-cvs] JBossRemoting/src/main/org/jboss/remoting/transport/coyote ...

Tom Elrod tom.elrod at jboss.com
Thu Sep 21 00:43:06 EDT 2006


  User: telrod  
  Date: 06/09/21 00:43:06

  Modified:    src/main/org/jboss/remoting/transport/coyote 
                        CoyoteInvoker.java
  Log:
  JBREM-601 - changes to how leasing works within http invoker transport (basically so messaging will work with http transport).
  
  Revision  Changes    Path
  1.19      +26 -3     JBossRemoting/src/main/org/jboss/remoting/transport/coyote/CoyoteInvoker.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CoyoteInvoker.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossRemoting/src/main/org/jboss/remoting/transport/coyote/CoyoteInvoker.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -b -r1.18 -r1.19
  --- CoyoteInvoker.java	12 Jul 2006 04:49:49 -0000	1.18
  +++ CoyoteInvoker.java	21 Sep 2006 04:43:06 -0000	1.19
  @@ -335,8 +335,6 @@
   
            }
   
  -         addLeaseInfo(response);
  -
            response.outputBuffer.close();
   
            req.action(ActionCode.ACTION_POST_REQUEST, null);
  @@ -486,11 +484,36 @@
         String sessionId = getSessionId(requestMap);
         String subSystem = (String) requestMap.get(HEADER_SUBSYSTEM);
   
  -      InvocationRequest request = new InvocationRequest(sessionId, subSystem, payload,
  +      InvocationRequest request = null;
  +
  +      boolean isLeaseQueury = checkForLeaseQuery(requestMap);
  +      if(isLeaseQueury)
  +      {
  +         addLeaseInfo(responseMap);
  +         request = new InvocationRequest(sessionId, subSystem, "$PING$", null, responseMap, null);
  +      }
  +      else
  +      {
  +         request = new InvocationRequest(sessionId, subSystem, payload,
                                                           requestMap, responseMap, null);
  +      }
         return request;
      }
   
  +   private boolean checkForLeaseQuery(RequestMap headers)
  +   {
  +      boolean isLeaseQuery = false;
  +
  +         if(headers != null)
  +         {
  +            Object val = headers.get(HTTPMetadataConstants.REMOTING_LEASE_QUERY);
  +            if(val != null && val instanceof String)
  +            {
  +               isLeaseQuery = Boolean.valueOf((String)val).booleanValue();
  +            }
  +         }
  +      return isLeaseQuery;
  +   }
   
      /**
       * Parse additional request parameters.
  
  
  



More information about the jboss-cvs-commits mailing list