[jboss-cvs] JBoss Messaging SVN: r2636 - in trunk: tests/src/org/jboss/test/messaging/jms and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu May 3 17:28:44 EDT 2007
Author: clebert.suconic at jboss.com
Date: 2007-05-03 17:28:44 -0400 (Thu, 03 May 2007)
New Revision: 2636
Modified:
trunk/src/main/org/jboss/jms/server/endpoint/ServerConnectionEndpoint.java
trunk/src/main/org/jboss/jms/server/endpoint/ServerConnectionFactoryEndpoint.java
trunk/tests/src/org/jboss/test/messaging/jms/DuplicateClientIDTest.java
Log:
http://jira.jboss.com/jira/browse/JBMESSAGING-952 - We should allow multiple connections with the same clientID
Modified: trunk/src/main/org/jboss/jms/server/endpoint/ServerConnectionEndpoint.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/endpoint/ServerConnectionEndpoint.java 2007-05-03 20:30:00 UTC (rev 2635)
+++ trunk/src/main/org/jboss/jms/server/endpoint/ServerConnectionEndpoint.java 2007-05-03 21:28:44 UTC (rev 2636)
@@ -302,8 +302,6 @@
throw new IllegalStateException("Cannot set clientID, already set as " + this.clientID);
}
- serverPeer.checkClientID(clientID);
-
log.debug(this + "setting client ID to " + clientID);
this.clientID = clientID;
Modified: trunk/src/main/org/jboss/jms/server/endpoint/ServerConnectionFactoryEndpoint.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/endpoint/ServerConnectionFactoryEndpoint.java 2007-05-03 20:30:00 UTC (rev 2635)
+++ trunk/src/main/org/jboss/jms/server/endpoint/ServerConnectionFactoryEndpoint.java 2007-05-03 21:28:44 UTC (rev 2636)
@@ -213,11 +213,6 @@
}
}
- if (clientIDUsed!=null)
- {
- serverPeer.checkClientID(clientIDUsed);
- }
-
// create the corresponding "server-side" connection endpoint and register it with the
// server peer's ClientManager
ServerConnectionEndpoint endpoint =
Modified: trunk/tests/src/org/jboss/test/messaging/jms/DuplicateClientIDTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/DuplicateClientIDTest.java 2007-05-03 20:30:00 UTC (rev 2635)
+++ trunk/tests/src/org/jboss/test/messaging/jms/DuplicateClientIDTest.java 2007-05-03 21:28:44 UTC (rev 2636)
@@ -70,10 +70,13 @@
{
c2 = cf.createConnection();
c2.setClientID("Duplicated");
- fail("JBossMessaging is allowing duplicate clients!");
}
catch (InvalidClientIDException e)
{
+ // From JMS Spec session 4.3.2 you could have multiple connections with the same
+ // ID... as long as you check for multiple ClientIDs and don't duplicate messages
+ fail("You could have multiple connections with the same clientID, " +
+ "as long they are not being in use!");
}
}
finally
@@ -115,13 +118,13 @@
assertNotNull(c2);
assertNotNull(c2.getClientID());
- if (c1.getClientID().equals(c2.getClientID()))
- {
- fail("JBossMessaging is allowing duplicate clients!");
- }
}
catch (InvalidClientIDException e)
{
+ // From JMS Spec session 4.3.2 you could have multiple connections with the same
+ // ID... as long as you check for multiple ClientIDs and don't duplicate messages
+ fail("You could have multiple connections with the same clientID, " +
+ "as long they are not being in use!");
}
}
finally
More information about the jboss-cvs-commits
mailing list