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

Ron Sigal ron_sigal at yahoo.com
Wed Aug 29 02:19:59 EDT 2007


  User: rsigal  
  Date: 07/08/29 02:19:59

  Modified:    src/main/org/jboss/remoting  Tag: remoting_2_x
                        ServerInvoker.java
  Log:
  JBREM-781, JBREM-782, JBREM-783: Synchronized with branch remoting_2_2_0_GA: (1) Responds to "$GET_CLIENT_LOCAL_ADDRESS$" request; (2) in getCallbackHandler() calls ServerInvokerCallbackHandler.connect(); (3) added some logging to terminateLease(); .
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.52.2.34 +22 -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.33
  retrieving revision 1.52.2.34
  diff -u -b -r1.52.2.33 -r1.52.2.34
  --- ServerInvoker.java	2 Jul 2007 05:50:55 -0000	1.52.2.33
  +++ ServerInvoker.java	29 Aug 2007 06:19:59 -0000	1.52.2.34
  @@ -69,7 +69,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.33 $
  + * @version $Revision: 1.52.2.34 $
    */
   public abstract class ServerInvoker extends AbstractInvoker implements ServerInvokerMBean
   {
  @@ -695,6 +695,12 @@
               return ir;
            }
   
  +         if ("$GET_CLIENT_LOCAL_ADDRESS$".equals(param))
  +         {
  +             // must be handled upstream by socket-specific code, return a null response here
  +             return new InvocationResponse(invocation.getSessionId(),  null, false, null);
  +         }
  +
            if ("$DISCONNECT$".equals(param))
            {
               if (leaseManagement)
  @@ -1643,6 +1649,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;
  @@ -1652,14 +1659,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);
            }
         }
      }
  @@ -1758,6 +1776,7 @@
            }
         }
   
  +      callbackHandler.connect();
         if(trace) { log.trace("ServerInvoker (" + this + ") adding server callback handler " + callbackHandler + " with id of " + id + "."); }
         return callbackHandler;
      }
  
  
  



More information about the jboss-cvs-commits mailing list