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

Ron Sigal ron_sigal at yahoo.com
Sat Jan 20 20:14:12 EST 2007


  User: rsigal  
  Date: 07/01/20 20:14:12

  Modified:    src/main/org/jboss/remoting  Tag: remoting_2_x
                        LeasePinger.java
  Log:
  JBREM-657: Added parameter "local" to stopPing() and removeClient() so that, optionally, they can execute without trying to contact server.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.8.2.5   +32 -25    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.8.2.4
  retrieving revision 1.8.2.5
  diff -u -b -r1.8.2.4 -r1.8.2.5
  --- LeasePinger.java	18 Jan 2007 21:31:42 -0000	1.8.2.4
  +++ LeasePinger.java	21 Jan 2007 01:14:12 -0000	1.8.2.5
  @@ -50,7 +50,7 @@
         timer.schedule(timerTask, pingPeriod, pingPeriod);
      }
   
  -   public synchronized void stopPing()
  +   public synchronized void stopPing(boolean local)
      {
         if(isTraceEnabled)
         {
  @@ -60,6 +60,9 @@
         {
            timerTask.cancel();
            timerTask = null;
  +         
  +         if (!local)
  +         {
            try
            {
               // sending null for the request map, will indicate to server that is full disconnect (for client invoker)
  @@ -73,6 +76,7 @@
            }
         }
      }
  +   }
   
      protected synchronized void sendClientPing()
      {
  @@ -141,7 +145,7 @@
         }
      }
   
  -   public synchronized boolean removeClient(String sessionId)
  +   public synchronized boolean removeClient(String sessionId, boolean local)
      {
         boolean isLastClientLease = false;
   
  @@ -150,6 +154,8 @@
            log.trace("Removing client with session ID " + sessionId + " from lease for client invoker with session ID " + invokerSessionId);
         }
         ClientHolder holder = (ClientHolder) clients.remove(sessionId);
  +      if (!local)
  +      {
         if (holder != null)
         {
            // send disconnect for this client
  @@ -172,6 +178,7 @@
         {
            log.warn("Tried to remove lease for client with session ID " + sessionId + ", but did not exist for client invoker lease (session ID " + invokerSessionId + ")");
         }
  +      }
   
         if (clients.isEmpty())
         {
  
  
  



More information about the jboss-cvs-commits mailing list