You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by jb...@apache.org on 2016/02/23 21:23:09 UTC

[1/2] activemq-artemis git commit: ARTEMIS-350 small improvement on the writable logic

Repository: activemq-artemis
Updated Branches:
  refs/heads/master 5abf5d3fc -> 4da4f3734


ARTEMIS-350 small improvement on the writable logic


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

Branch: refs/heads/master
Commit: 6bdfe95f665d19b868b8246358941b72419512ab
Parents: 5abf5d3
Author: Clebert Suconic <cl...@apache.org>
Authored: Tue Feb 23 15:03:57 2016 -0500
Committer: Clebert Suconic <cl...@apache.org>
Committed: Tue Feb 23 15:04:49 2016 -0500

----------------------------------------------------------------------
 .../activemq/artemis/core/replication/ReplicationManager.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6bdfe95f/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicationManager.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicationManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicationManager.java
index 8f0774e..a393816 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicationManager.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicationManager.java
@@ -110,7 +110,7 @@ public final class ReplicationManager implements ActiveMQComponent, ReadyListene
 
    private volatile boolean enabled;
 
-   private final AtomicBoolean writable = new AtomicBoolean(false);
+   private final AtomicBoolean writable = new AtomicBoolean(true);
 
    private final Object replicationLock = new Object();
 
@@ -345,6 +345,7 @@ public final class ReplicationManager implements ActiveMQComponent, ReadyListene
             pendingTokens.add(repliToken);
             if (!replicatingChannel.getConnection().isWritable(this)) {
                try {
+                  writable.set(false);
                   //don't wait for ever as this may hang tests etc, we've probably been closed anyway
                   long now = System.currentTimeMillis();
                   long deadline = now + 5000;
@@ -352,7 +353,6 @@ public final class ReplicationManager implements ActiveMQComponent, ReadyListene
                      replicationLock.wait(deadline - now);
                      now = System.currentTimeMillis();
                   }
-                  writable.set(false);
                }
                catch (InterruptedException e) {
                   throw new ActiveMQInterruptedException(e);


[2/2] activemq-artemis git commit: This closes #402

Posted by jb...@apache.org.
This closes #402


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

Branch: refs/heads/master
Commit: 4da4f3734d30c952151aa68e9346cbfb04ed2b27
Parents: 5abf5d3 6bdfe95
Author: jbertram <jb...@apache.org>
Authored: Tue Feb 23 14:22:43 2016 -0600
Committer: jbertram <jb...@apache.org>
Committed: Tue Feb 23 14:22:43 2016 -0600

----------------------------------------------------------------------
 .../activemq/artemis/core/replication/ReplicationManager.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------