activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbert...@apache.org
Subject [1/2] activemq-artemis git commit: ARTEMIS-539 fixing default address on client as well
Date Fri, 03 Jun 2016 16:19:56 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 14516af7c -> ac87304b1


ARTEMIS-539 fixing default address on client as well


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/17ea05bc
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/17ea05bc
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/17ea05bc

Branch: refs/heads/master
Commit: 17ea05bce666e27b9a2808f4a186307ef92c1b2b
Parents: 14516af
Author: Clebert Suconic <clebertsuconic@apache.org>
Authored: Fri Jun 3 11:59:09 2016 -0400
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Fri Jun 3 12:04:20 2016 -0400

----------------------------------------------------------------------
 .../activemq/artemis/core/client/impl/ClientSessionImpl.java  | 7 +++++--
 .../activemq/artemis/core/server/impl/ServerSessionImpl.java  | 2 ++
 2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/17ea05bc/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionImpl.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionImpl.java
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionImpl.java
index ae8966c..c973133 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionImpl.java
@@ -1054,9 +1054,11 @@ public final class ClientSessionImpl implements ClientSessionInternal,
FailureLi
       if (defaultAddress == null) {
          defaultAddress = address;
 
-         message.setAddress(address);
+         if (message != null) {
+            message.setAddress(address);
+         }
       }
-      else {
+      else if (message != null) {
          if (!address.equals(defaultAddress)) {
             message.setAddress(address);
          }
@@ -1085,6 +1087,7 @@ public final class ClientSessionImpl implements ClientSessionInternal,
FailureLi
 
    @Override
    public synchronized ClientProducerCredits getCredits(final SimpleString address, final
boolean anon) {
+      setAddress(null, address);
       ClientProducerCredits credits = producerCreditManager.getCredits(address, anon, sessionContext);
 
       return credits;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/17ea05bc/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java
index 7c65c21..f5cbaf3 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java
@@ -1268,7 +1268,9 @@ public class ServerSessionImpl implements ServerSession, FailureListener
{
    }
 
    protected void checkDefaultAddress(SimpleString address) {
+      logger.tracef("checkDefaultAddress %s, defaultAddress=%s", address, defaultAddress);
       if (defaultAddress == null && address != null) {
+         logger.tracef("checkDefaultAddress setting as %s", address);
          defaultAddress = address;
       }
    }


Mime
View raw message