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

Ron Sigal ron_sigal at yahoo.com
Tue Aug 7 20:18:02 EDT 2007


  User: rsigal  
  Date: 07/08/07 20:18:02

  Modified:    src/main/org/jboss/remoting  Tag: remoting_2_2_0_GA
                        ServerInvoker.java
  Log:
  JBREM-783:  Added some logging to terminateLease().
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.52.2.28.4.2 +15 -3     JBossRemoting/src/main/org/jboss/remoting/ServerInvoker.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ServerInvoker.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossRemoting/src/main/org/jboss/remoting/ServerInvoker.java,v
  retrieving revision 1.52.2.28.4.1
  retrieving revision 1.52.2.28.4.2
  diff -u -b -r1.52.2.28.4.1 -r1.52.2.28.4.2
  --- ServerInvoker.java	2 Aug 2007 06:57:14 -0000	1.52.2.28.4.1
  +++ ServerInvoker.java	8 Aug 2007 00:18:02 -0000	1.52.2.28.4.2
  @@ -67,7 +67,7 @@
    * @author <a href="mailto:tom.elrod at jboss.com">Tom Elrod</a>
    * @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
    *
  - * @version $Revision: 1.52.2.28.4.1 $
  + * @version $Revision: 1.52.2.28.4.2 $
    */
   public abstract class ServerInvoker extends AbstractInvoker implements ServerInvokerMBean
   {
  @@ -1542,6 +1542,7 @@
                  {
                     // just a client that disconnected, so only need to terminate lease for
                     // that particular client (by client session id).
  +            	  if (trace) log.trace("terminating client lease: " + clientSessionId);
                     ClientHolder holder = (ClientHolder) holderObj;
                     clientLease.terminateLease(holder.getSessionId());
                     clientOnlyTerminated = true;
  @@ -1551,14 +1552,25 @@
               // now see if client invoker needs to be terminated
               if (!clientOnlyTerminated)
               {
  +               if (trace) log.trace("terminating invoker lease: " + clientSessionId);
                  clientLease.terminateLease(clientSessionId);
                  clientLeases.remove(clientSessionId);
               }
            }
            else
            {
  -            log.warn("Asked to terminate lease for client session id " + clientSessionId +
  -               ", but lease for this id could not be found.");
  +             String type = "invoker";
  +        	 Map reqMap = invocation.getRequestPayload();
  +             if (reqMap != null)
  +             {
  +                Object holderObj = reqMap.get(ClientHolder.CLIENT_HOLDER_KEY);
  +                if (holderObj != null && holderObj instanceof ClientHolder)
  +                {
  +                	type = "client";
  +                }
  +             }
  +             log.warn("Asked to terminate " + type + " lease for client session id " + clientSessionId +
  +                       ", but lease for this id could not be found." + ": " + clientLeases);
            }
         }
      }
  
  
  



More information about the jboss-cvs-commits mailing list