activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ARTEMIS-728) Broker doesn't support unique jms client-id (qpid-jms client)
Date Mon, 12 Sep 2016 14:22:20 GMT

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

ASF GitHub Bot commented on ARTEMIS-728:
----------------------------------------

Github user gaohoward commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/769#discussion_r78381566
  
    --- Diff: artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/plug/ActiveMQProtonConnectionCallback.java
---
    @@ -85,7 +105,42 @@ public boolean isSupportsAnonymous() {
        }
     
        @Override
    +   public void init() throws Exception {
    +      //This internal core session is used to represent the connection
    +      //in core server. It is used to identify unique clientIDs.
    +      //Note the Qpid-JMS client does create a initial session
    +      //for each connection. However is comes in as a Begin
    +      //After Open. This makes it unusable for this purpose
    +      //as we need to decide the uniqueness in response to
    +      //Open, and the checking Uniqueness and adding the unique
    +      //client-id to server need to be atomic.
    +      if (internalSession == null) {
    +         SASLResult saslResult = amqpConnection.getSASLResult();
    +         String user = null;
    +         String passcode = null;
    +         if (saslResult != null) {
    +            user = saslResult.getUser();
    +            if (saslResult instanceof PlainSASLResult) {
    +               passcode = ((PlainSASLResult) saslResult).getPassword();
    +            }
    +         }
    +         internalSession = manager.getServer().createSession(createInternalSessionName(),
user, passcode, ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, protonConnectionDelegate, //
RemotingConnection remotingConnection,
    --- End diff --
    
    @clebertsuconic yes that seems suck. I indeed thought of a refactor but it may affects
artemis jms client and we may consider doing it in a separate Jira.
    btw I'll be on PTO/holiday for the rest of the week. I'll be back on Monday.


> Broker doesn't support unique jms client-id (qpid-jms client)
> -------------------------------------------------------------
>
>                 Key: ARTEMIS-728
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-728
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: AMQP
>    Affects Versions: 1.3.0
>            Reporter: Howard Gao
>            Assignee: Howard Gao
>             Fix For: 1.4.0
>
>
> Using qpid-jms client to set a client-id that has already set on another connection does't
get expected InvalidClientIDException exception.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message