[jira] [Updated] (QPID-3428) Verifification of unique client ID does not work in Java Broker
[ https://issues.apache.org/jira/browse/QPID-3428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Robbie Gemmell updated QPID-3428: - Assignee: Andrew MacBean (was: Robbie Gemmell) Status: Open (was: Ready To Review) Changes look good overall, but theres a some bits I think could be improved: In ServerConnectionDelegate.sessionAttach, the clientId (sessionName, rather?) variable can never be null so the check is redundant.Also, in the new 'isSessionNameUnique' method, we can probably be mroe efficient than iterating over every Session in the broker and comparing ClientIDs. Each Connection object has a Map of session names to their Session, so it should be possible to just ask query connection whether it has a Session with a given name, with the 0-8/9/9-1 connections simply returning false since they dont support that. In AMQConnectionDelegate / AMQConnection, it seems like it would be better to use a boolean for the result normally and rethrow any unexpected exceptions, rather than detecting whether or not there is a linked exception set to distinguish between two JMSExceptions. Finally, in ConnectionTest you could use the setTestSystemProperty() method from QpidTestCase method to update and revert the 'qpid.verify_client_id' property (which should probably be a constant; there should be one in ClientProperties, but if there isnt it needs added). Verifification of unique client ID does not work in Java Broker --- Key: QPID-3428 URL: https://issues.apache.org/jira/browse/QPID-3428 Project: Qpid Issue Type: Bug Components: Java Broker, Java Client Affects Versions: 0.10 Reporter: Alex Rudyy Assignee: Andrew MacBean Priority: Minor Attachments: [QPID-3428]-verifification-of-unique-client-ID-does-not-work-in-Java-Broker.patch On settings client JVM property qpid.verify_client_id to true Qpid broker should not allow creation of connections with the same client id. However, this functionality does not work at the moment. JUnit test org.apache.qpid.test.unit.client.connection.ConnectionTest#testClientIDVerification fails with the following message: The client should throw a ConnectionException stating the client ID is not unique junit.framework.AssertionFailedError: The client should throw a ConnectionException stating the client ID is not unique at org.apache.qpid.test.unit.client.connection.ConnectionTest.testClientIDVerification(ConnectionTest.java:307) at org.apache.qpid.test.utils.QpidBrokerTestCase.runBare(QpidBrokerTestCase.java:243) at org.apache.qpid.test.utils.QpidTestCase.run(QpidTestCase.java:125) -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira - Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:dev-subscr...@qpid.apache.org
[jira] [Updated] (QPID-3428) Verifification of unique client ID does not work in Java Broker
[ https://issues.apache.org/jira/browse/QPID-3428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andrew MacBean updated QPID-3428: - Status: Ready To Review (was: In Progress) Verifification of unique client ID does not work in Java Broker --- Key: QPID-3428 URL: https://issues.apache.org/jira/browse/QPID-3428 Project: Qpid Issue Type: Bug Components: Java Broker, Java Client Affects Versions: 0.10 Reporter: Alex Rudyy Assignee: Andrew MacBean Priority: Minor Attachments: [QPID-3428]-verifification-of-unique-client-ID-does-not-work-in-Java-Broker.patch On settings client JVM property qpid.verify_client_id to true Qpid broker should not allow creation of connections with the same client id. However, this functionality does not work at the moment. JUnit test org.apache.qpid.test.unit.client.connection.ConnectionTest#testClientIDVerification fails with the following message: The client should throw a ConnectionException stating the client ID is not unique junit.framework.AssertionFailedError: The client should throw a ConnectionException stating the client ID is not unique at org.apache.qpid.test.unit.client.connection.ConnectionTest.testClientIDVerification(ConnectionTest.java:307) at org.apache.qpid.test.utils.QpidBrokerTestCase.runBare(QpidBrokerTestCase.java:243) at org.apache.qpid.test.utils.QpidTestCase.run(QpidTestCase.java:125) -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira - Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:dev-subscr...@qpid.apache.org
[jira] [Updated] (QPID-3428) Verifification of unique client ID does not work in Java Broker
[ https://issues.apache.org/jira/browse/QPID-3428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andrew MacBean updated QPID-3428: - Attachment: [QPID-3428]-verifification-of-unique-client-ID-does-not-work-in-Java-Broker.patch Verifification of unique client ID does not work in Java Broker --- Key: QPID-3428 URL: https://issues.apache.org/jira/browse/QPID-3428 Project: Qpid Issue Type: Bug Components: Java Broker, Java Client Affects Versions: 0.10 Reporter: Alex Rudyy Assignee: Robbie Gemmell Priority: Minor Attachments: [QPID-3428]-verifification-of-unique-client-ID-does-not-work-in-Java-Broker.patch On settings client JVM property qpid.verify_client_id to true Qpid broker should not allow creation of connections with the same client id. However, this functionality does not work at the moment. JUnit test org.apache.qpid.test.unit.client.connection.ConnectionTest#testClientIDVerification fails with the following message: The client should throw a ConnectionException stating the client ID is not unique junit.framework.AssertionFailedError: The client should throw a ConnectionException stating the client ID is not unique at org.apache.qpid.test.unit.client.connection.ConnectionTest.testClientIDVerification(ConnectionTest.java:307) at org.apache.qpid.test.utils.QpidBrokerTestCase.runBare(QpidBrokerTestCase.java:243) at org.apache.qpid.test.utils.QpidTestCase.run(QpidTestCase.java:125) -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira - Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:dev-subscr...@qpid.apache.org