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

Jeff Mesnil commented on ARTEMIS-1206:
--------------------------------------

[~clebertsuconic] I disagree with this issue.

Fundamentally, a Client ID uniquely identifies the Client, not the connection.
If a client has configured a CF with a ClientID, *all* connections created by 
the client should report the same clientID. With that fix, a CF with a client 
ID can only create 1 connection.

JMS explicitely mentions: "The preferred way to assign a JMS client's client 
identifier is for it to be configured in a client-specific ConnectionFactory 
object and transparently assigned to the Connection object it creates."

Please note that the exact wording is : "If another connection with the same 
clientID is already running when this method is called, the JMS provider should 
detect the duplicate ID and throw an InvalidClientIDException."

This means that the InvalidClientIDException should only be throw within 
setClientID, not as a general validation of the connection metadata.
The test attached to the PR is wrong: ConnectionFactory.createConnection() is 
not specifying that InvalidClientException can be thrown...

If you think in the context of Artemis Resource Adapter, that provides a *pool* 
of connection used by a client, this issue is wrong too. The connections in the 
pool MUST all have the client ID as specified by the resource adapter.

> [Core JMS Client] Violates JMS Specification - allows two active connections 
> with same clientid
> -----------------------------------------------------------------------------------------------
>
>                 Key: ARTEMIS-1206
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1206
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>    Affects Versions: 2.1.0
>            Reporter: Michael Andre Pearce
>            Assignee: clebert suconic
>            Priority: Major
>             Fix For: 2.2.0
>
>         Attachments: JMSDurableConsumerTest2.java, 
> JMSDurableConsumerTest2.java
>
>
> Currently it is possible to make two completely separate client connections 
> to the broker, with the same client id.
> This was found/raised as a possible bug in Core Client on looking at 
> differing behaviours between the Core JMS Client and the Qpid AMQP Client.
> https://issues.apache.org/jira/browse/ARTEMIS-1205
> Attached is a test case, where by the Qpid Client errors, and the Core Client 
> does not, executing the same client code.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to