activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gaohoward <...@git.apache.org>
Subject [GitHub] activemq-artemis pull request #769: ARTEMIS-728 Broker doesn't support uniqu...
Date Mon, 12 Sep 2016 14:22:06 GMT
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.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message