Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 285AB200C7C for ; Mon, 5 Jun 2017 18:02:09 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 273BD160BE1; Mon, 5 Jun 2017 16:02:09 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 6DA50160BD4 for ; Mon, 5 Jun 2017 18:02:08 +0200 (CEST) Received: (qmail 36424 invoked by uid 500); 5 Jun 2017 16:02:07 -0000 Mailing-List: contact issues-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list issues@activemq.apache.org Received: (qmail 36412 invoked by uid 99); 5 Jun 2017 16:02:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Jun 2017 16:02:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 404D91AFC11 for ; Mon, 5 Jun 2017 16:02:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id R8GbAPDzw4ba for ; Mon, 5 Jun 2017 16:02:06 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id C7BB25FD3F for ; Mon, 5 Jun 2017 16:02:05 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id EED5EE0D6A for ; Mon, 5 Jun 2017 16:02:04 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 4D81621B5A for ; Mon, 5 Jun 2017 16:02:04 +0000 (UTC) Date: Mon, 5 Jun 2017 16:02:04 +0000 (UTC) From: "Timothy Bish (JIRA)" To: issues@activemq.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ARTEMIS-1206) [Core JMS Client] Violates JMS Specification - allows two active connections with same clientid MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 05 Jun 2017 16:02:09 -0000 [ https://issues.apache.org/jira/browse/ARTEMIS-1206?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16= 037141#comment-16037141 ]=20 Timothy Bish commented on ARTEMIS-1206: --------------------------------------- {noformat} 6.1.2. Client identifier The preferred way to assign a client=E2=80=99s 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=E2=80=99s client identifier using a provider-specific value. The= facility to explicitly set a connection=E2=80=99s client identifier is not a mechani= sm 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 calli= ng 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 po= int, 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 objec= ts with a state maintained on behalf of the client by a provider. By definitio= n, the client state identified by a client identifier can be =E2=80=98in use= =E2=80=99 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 =E2=80=98sharing=E2=80=99 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 connecti= ons 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 connectio= ns to the broker, with the same client id. > This was found/raised as a possible bug in Core Client on looking at diff= ering 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 Cl= ient does not, executing the same client code. -- This message was sent by Atlassian JIRA (v6.3.15#6346)