[jboss-remoting-commits] JBoss Remoting SVN: r5155 - 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
Thu May 7 21:51:25 EDT 2009


Author: ron.sigal at jboss.com
Date: 2009-05-07 21:51:25 -0400 (Thu, 07 May 2009)
New Revision: 5155

Modified:
   remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/Client.java
Log:
JBREM-1128: Uses "useClientConnectIdentity" parameter.

Modified: remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/Client.java
===================================================================
--- remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/Client.java	2009-05-07 21:58:37 UTC (rev 5154)
+++ remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/Client.java	2009-05-08 01:51:25 UTC (rev 5155)
@@ -197,6 +197,8 @@
    private boolean connected = false;
    
    private Set connectionListeners = new HashSet();
+   
+   private boolean useClientConnectionIdentity;
 
    // Constructors ---------------------------------------------------------------------------------
 
@@ -274,6 +276,15 @@
       if (configuration != null)
       {
          this.configuration = new HashMap(configuration);
+         Object o = configuration.get(Remoting.USE_CLIENT_CONNECTION_IDENTITY);
+         if (o instanceof String)
+         {
+            useClientConnectionIdentity = Boolean.valueOf((String) o).booleanValue();
+         }
+         else if (o != null)
+         {
+            log.warn("value of " + Remoting.USE_CLIENT_CONNECTION_IDENTITY + " must be a String: " + o); 
+         }
       }
       this.sessionId = new GUID().toString();
    }
@@ -1819,8 +1830,11 @@
          {
              temp.putAll(metadata);
          }
-         temp.put(CLIENT, this);
-         temp.put(CONNECTION_LISTENER, listener);
+         if (useClientConnectionIdentity)
+         {
+            temp.put(CLIENT, this);
+            temp.put(CONNECTION_LISTENER, listener);
+         }
          log.debug(this + ": temp = " + temp);
          log.debug(this + " calling MicroRemoteClientInvoker.establishLease()");
          invoker.establishLease(sessionId, temp, leasePeriod);




More information about the jboss-remoting-commits mailing list