activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [1/2] activemq-artemis git commit: ARTEMIS-262 Check connection status change before callbacks
Date Tue, 20 Oct 2015 17:03:31 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master efce1d7a7 -> 9608c3165


ARTEMIS-262 Check connection status change before callbacks


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

Branch: refs/heads/master
Commit: 3e6f2294367a7ca671f8756e4e7768979c689d6d
Parents: efce1d7
Author: Martyn Taylor <mtaylor@redhat.com>
Authored: Tue Oct 20 10:41:00 2015 +0100
Committer: Martyn Taylor <mtaylor@redhat.com>
Committed: Tue Oct 20 10:41:00 2015 +0100

----------------------------------------------------------------------
 .../artemis/core/client/impl/ClientSessionFactoryImpl.java   | 8 +++++---
 .../artemis/tests/integration/cluster/bridge/BridgeTest.java | 8 +++-----
 2 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3e6f2294/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java
index 6e1ccbd..3902fd3 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java
@@ -375,9 +375,11 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal,
C
 
    public void connectionReadyForWrites(final Object connectionID, final boolean ready) {
       synchronized (connectionReadyLock) {
-         connectionReadyForWrites = ready;
-         for (ConnectionLifeCycleListener lifeCycleListener : lifeCycleListeners) {
-            lifeCycleListener.connectionReadyForWrites(connectionID, ready);
+         if (connectionReadyForWrites != ready) {
+            connectionReadyForWrites = ready;
+            for (ConnectionLifeCycleListener lifeCycleListener : lifeCycleListeners) {
+               lifeCycleListener.connectionReadyForWrites(connectionID, ready);
+            }
          }
       }
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3e6f2294/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTest.java
index 37338aa..54d967e 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTest.java
@@ -152,7 +152,6 @@ public class BridgeTest extends ActiveMQTestBase {
       final String forwardAddress = "forwardAddress";
       final String queueName1 = "queue1";
 
-      // Map<String, TransportConfiguration> connectors = new HashMap<String, TransportConfiguration>();
       TransportConfiguration server0tc = new TransportConfiguration(getConnector(), server0Params);
 
       TransportConfiguration server1tc = new TransportConfiguration(getConnector(), server1Params);
@@ -161,10 +160,9 @@ public class BridgeTest extends ActiveMQTestBase {
       connectors.put(server1tc.getName(), server1tc);
       server0.getConfiguration().setConnectorConfigurations(connectors);
 
-//      final int messageSize = 1024 * 1024 * 5;
-      final int messageSize = 1024 * 10;
+      final int messageSize = 1024 * 1024 * 5;
 
-      final int numMessages = 100000;
+      final int numMessages = 10;
 
       ArrayList<String> connectorConfig = new ArrayList<String>();
       connectorConfig.add(server1tc.getName());
@@ -270,7 +268,7 @@ public class BridgeTest extends ActiveMQTestBase {
 
       final int messageSize = 1024;
 
-      final int numMessages = 10000;
+      final int numMessages = 10;
 
       ArrayList<String> connectorConfig = new ArrayList<String>();
       connectorConfig.add(server1tc.getName());


Mime
View raw message