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

Robbie Gemmell commented on ARTEMIS-1206:
-----------------------------------------

I dont actually think the initial case was invalid. It would also seem at best 
inconsistent for the ClientID provided via a ConnectionFactory not to result in 
similar behaviour to one provided via the Connection, given the common purpose. 
If two connections with the same ClientID are able to operate concurrently, 
providing the ClientID has arguably been ineffective in doing the main thing it 
existed to do. One thing I see is that concurrently using a shared subscription 
from multiple Connections with the same ClientID is possible (which isnt meant 
to be the case) so long as you had set the ClientID via the ConnectionFactory, 
whereas the same thing isn't possible if you set the ClientID via the 
Connection as you are prevented from getting as far as creating subscribers.

Setting the ClientID on the ConnectionFactory before creating a Connection is 
actually the specs preferred way of configuring a ClientID, per the excerpt 
above. It is true there is no setClientID method for ConnectionFactory in the 
JMS spec to do this (perhaps as they are expected to be 'administratively 
configured' and used via JNDI?) but that doesnt mean the ClientID behaviour 
detailed by the spec doesn't still govern the ConnectionFactory routes 
behaviour. 

> [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
>            Reporter: Michael Andre Pearce
>         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
(v6.3.15#6346)

Reply via email to