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

Tom Elrod tom.elrod at jboss.com
Wed Sep 20 14:54:37 EDT 2006


  User: telrod  
  Date: 06/09/20 14:54:37

  Modified:    src/main/org/jboss/remoting   Lease.java LeasePinger.java
  Log:
  JBREM-596 - fix for leasing problem when have multiple clients using same client invoker.  Basically moved all lease managment for clients into the client invokers themselves.
  
  Revision  Changes    Path
  1.10      +8 -2      JBossRemoting/src/main/org/jboss/remoting/Lease.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Lease.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossRemoting/src/main/org/jboss/remoting/Lease.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -b -r1.9 -r1.10
  --- Lease.java	20 Sep 2006 04:22:26 -0000	1.9
  +++ Lease.java	20 Sep 2006 18:54:36 -0000	1.10
  @@ -61,7 +61,10 @@
         this.leasePeriod = leasePeriod;
         this.notifier = notifier;
         this.locatorURL = locatorurl;
  -      this.requestPayload = requestPayload;
  +      if(requestPayload != null)
  +      {
  +         this.requestPayload = (Map)requestPayload.get(ClientHolder.CLIENT_HOLDER_KEY);
  +      }
         this.leaseWindow = leasePeriod * 2;
         this.clientLeases = clientLeases;
      }
  @@ -79,7 +82,10 @@
   
      public void updateLease(long leasePeriod, Map requestMap)
      {
  -      this.requestPayload = requestMap;
  +      if(requestMap != null)
  +      {
  +         this.requestPayload = (Map)requestMap.get(ClientHolder.CLIENT_HOLDER_KEY);
  +      }
         updateLease(leasePeriod);
      }
   
  
  
  
  1.7       +3 -1      JBossRemoting/src/main/org/jboss/remoting/LeasePinger.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: LeasePinger.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossRemoting/src/main/org/jboss/remoting/LeasePinger.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -b -r1.6 -r1.7
  --- LeasePinger.java	20 Sep 2006 04:22:26 -0000	1.6
  +++ LeasePinger.java	20 Sep 2006 18:54:36 -0000	1.7
  @@ -92,7 +92,9 @@
                            "Currently managing lease for following clients:\n" + clientSessionIds);
               } // end trace
   
  -            client.invoke(new InvocationRequest(invokerSessionId, null, "$PING$", clients, null, null));
  +            Map clientsClone = new HashMap();
  +            clientsClone.put(ClientHolder.CLIENT_HOLDER_KEY, clients);
  +            client.invoke(new InvocationRequest(invokerSessionId, null, "$PING$", clientsClone, null, null));
            }
            catch (Throwable throwable)
            {
  
  
  



More information about the jboss-cvs-commits mailing list