[jboss-cvs] JBoss Messaging SVN: r2352 - branches/Branch_Bisocket_Experiment2/src/main/org/jboss/jms/client/remoting.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Feb 19 15:29:04 EST 2007


Author: ron_sigal
Date: 2007-02-19 15:29:04 -0500 (Mon, 19 Feb 2007)
New Revision: 2352

Modified:
   branches/Branch_Bisocket_Experiment2/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java
Log:
Uses a GUID to make sure callback InvokerLocator is unique.

Modified: branches/Branch_Bisocket_Experiment2/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java
===================================================================
--- branches/Branch_Bisocket_Experiment2/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java	2007-02-19 17:47:16 UTC (rev 2351)
+++ branches/Branch_Bisocket_Experiment2/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java	2007-02-19 20:29:04 UTC (rev 2352)
@@ -130,6 +130,17 @@
             // which creates ServerSockets.  The actual value of the port shouldn't matter.
             if (propertyPort == null)
                metadata.put(Client.CALLBACK_SERVER_PORT, Integer.toString(new GUID().hashCode()));
+ 
+            // Setting the port prevents the Remoting Client from using PortUtil.findPort(),
+            // which creates ServerSockets.  The actual value of the port shouldn't matter.
+            // To "guarantee" that each InvokerLocator is unique, a GUID is appended to
+            // the InvokerLocator.
+            if (propertyPort == null)
+            {
+               String guid = new GUID().toString();
+               metadata.put(Client.CALLBACK_SERVER_PORT, Integer.toString(guid.hashCode()));
+               metadata.put("guid", guid);
+            }
          }
       }
       else




More information about the jboss-cvs-commits mailing list