You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "jiraposter@reviews.apache.org (JIRA)" <ji...@apache.org> on 2011/07/07 04:19:18 UTC

[jira] [Commented] (QPID-3269) Concurrently executing connections are allowed to use the same client ID

    [ https://issues.apache.org/jira/browse/QPID-3269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13061003#comment-13061003 ] 

jiraposter@reviews.apache.org commented on QPID-3269:
-----------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1027/
-----------------------------------------------------------

Review request for qpid, Gordon Sim and Robbie Gemmell.


Summary
-------

In order to verify the uniqueness of the client ID, a dummy session is created using client ID as it's name. This prevents any other connection from using same client ID as the session creation will fail. However this verification is switched off by default in order to preserve backwards compatibility. You need to use -Dqpid.verify_client_id=true switch verification on.

In summary the following changes were made in order to support the above,
1. A verifyClientID method was added to the connection delegates,
2. AMQSession_0_10.java was modified to allow a name to be specified for the underlying AMQP session.
3. A method was added to o.a.q.transport.Session.java to wait until the session state was changed from NEW to OPEN (or another state which triggers the error).
4. Setter/Getter in Session.java to store/retrieve the SessionDetachCode and ConnectionDelegate to set the detach code.
5. SessionDelegate to notify Session object when attached/dettached/closed is invoked.


This addresses bug QPID-3269.
    https://issues.apache.org/jira/browse/QPID-3269


Diffs
-----

  http://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java 1143628 
  http://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate.java 1143628 
  http://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_0_10.java 1143628 
  http://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_8_0.java 1143628 
  http://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java 1143628 
  http://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/XASessionImpl.java 1143628 
  http://svn.apache.org/repos/asf/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/configuration/ClientProperties.java 1143628 
  http://svn.apache.org/repos/asf/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/ConnectionDelegate.java 1143628 
  http://svn.apache.org/repos/asf/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java 1143628 
  http://svn.apache.org/repos/asf/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/SessionDelegate.java 1143628 

Diff: https://reviews.apache.org/r/1027/diff


Testing
-------

A patch containing a test will be attached to the JIRA shortly.


Thanks,

rajith



>  Concurrently executing connections are allowed to use the same client ID
> -------------------------------------------------------------------------
>
>                 Key: QPID-3269
>                 URL: https://issues.apache.org/jira/browse/QPID-3269
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: 0.6, 0.8, 0.10
>            Reporter: Rajith Attapattu
>            Assignee: Rajith Attapattu
>            Priority: Minor
>             Fix For: 0.11
>
>
> Section 4.3.2 of the JMS spec says that the JMS provider 
> should prevent concurrently executing clients from using the same client id.
> Qpid JMS client allows two connections to be created using the same client id.
> How reproducible:
> Always
> Steps to Reproduce:
> 1. Create two connections with the same client ID.
> 2. Observe that there are no exceptions being thrown.
> Actual results:
> No exception being thrown.
> Expected results:
> An exception should be thrown.

--
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-subscribe@qpid.apache.org