[jboss-remoting-commits] JBoss Remoting SVN: r5133 - remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting.

jboss-remoting-commits at lists.jboss.org jboss-remoting-commits at lists.jboss.org
Tue May 5 04:24:28 EDT 2009


Author: ron.sigal at jboss.com
Date: 2009-05-05 04:24:28 -0400 (Tue, 05 May 2009)
New Revision: 5133

Modified:
   remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/MicroRemoteClientInvoker.java
Log:
JBREM-1112 (and others to be named): In establishLease(), call to Client.addConnectionListener() is taken out of finally block.

Modified: remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/MicroRemoteClientInvoker.java
===================================================================
--- remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/MicroRemoteClientInvoker.java	2009-05-05 08:23:32 UTC (rev 5132)
+++ remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/MicroRemoteClientInvoker.java	2009-05-05 08:24:28 UTC (rev 5133)
@@ -344,7 +344,8 @@
    {
       synchronized(clientLeaseLock)
       {
-         if (passedLeasePinger != leasePinger)
+          log.debug(this + " entering terminateLease()");
+         if (passedLeasePinger != null && passedLeasePinger != leasePinger)
          {
             log.debug(this + ": " + passedLeasePinger + " != " + leasePinger);
             return;
@@ -365,7 +366,7 @@
                }
                catch (Exception e)
                {
-                  log.debug("error shutting down lease pinger");
+                  log.debug("error shutting down lease pinger", e);
                }
                leasePinger = null;
             }
@@ -422,7 +423,7 @@
          if (leasePinger != null)
          {
             leasePinger.addClient(clientSessionID, configuration, leasePeriod);
-            log.debug(this + " added client with session ID " + clientSessionID + " to the lease pinger");
+            log.debug(this + " added client with session ID " + clientSessionID + " to " + leasePinger);
             return;
          }
 
@@ -437,7 +438,7 @@
             Map requestMap = new HashMap();
             requestMap.put(LeasePinger.LEASE_PINGER_ID, leasePingerId);
             requestMap.put("time", Long.toString(System.currentTimeMillis()));
-            log.info(this + " initiating lease for leasePingerId " + leasePingerId);
+            log.debug(this + " initiating lease for leasePingerId " + leasePingerId);
             InvocationRequest ir = new InvocationRequest(invokerSessionID, null, "$PING$", requestMap, new HashMap(), null);
 
             Object ret = invoke(ir);
@@ -477,10 +478,11 @@
             e.initCause(throwable);
             throw e;
          }
-         finally
+//         finally
          {
 //             Client client = (Client) configuration.get(Client.CLIENT);
 //             ConnectionListener listener = (ConnectionListener) configuration.get(Client.CONNECTION_LISTENER);
+             log.debug(this + ": client = " + client + ", listener = " + listener);
              if (client != null && listener != null)
              {
                  client.addConnectionListener(listener, configuration);




More information about the jboss-remoting-commits mailing list