activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Bish (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ARTEMIS-1206) [Core JMS Client] Violates JMS Specification - allows two active connections with same clientid
Date Mon, 05 Jun 2017 16:02:04 GMT

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

Timothy Bish commented on ARTEMIS-1206:
---------------------------------------

{noformat}
6.1.2.
Client identifier
The preferred way to assign a client’s client identifier is for it to be
configured in a client-specific ConnectionFactory and transparently
assigned to the connection it creates. Alternatively, a client can set a
connection’s client identifier using a provider-specific value. The facility
to explicitly set a connection’s client identifier is not a mechanism for
overriding the identifier that has been administratively configured. It is
provided for the case where no administratively specified identifier exists.
If one does exist, an attempt to change it by setting it must throw an
IllegalStateException .
An application may explicitly set a connection's client identifier by calling
the setClientID method on the Connection , JMSContext ,
QueueConnection or TopicConnection object.
If a client explicitly sets a connection's client identifier it must do so
immediately after creating the Connection , JMSContext ,
QueueConnection or TopicConnection and before any other action on
60
Java Message Service Version 2.0 revision athis object taken. After this point, setting the
client identifier is a
programming error that should throw an IllegalStateException .
The purpose of client identifier is to associate a connection and its objects
with a state maintained on behalf of the client by a provider. By definition,
the client state identified by a client identifier can be ‘in use’ by only one
client at a time. A JMS provider must prevent concurrently executing
clients from using it.
This prevention may take the form of a JMSException being thrown
when such use is attempted; it may result in the offending client being
blocked; or some other solution. A JMS provider must ensure that such
attempted ‘sharing’ of an individual client state does not result in
messages being lost or doubly processed.
The only use of a client identifier defined by JMS is its mandatory use in
identifying an unshared durable subscription or its optional use in
identifying a shared durable or non-durable subscription.
{noformat}

> [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
>
>
> 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)

Mime
View raw message