Repository: activemq-artemis Updated Branches: refs/heads/master a3ae2c4ad -> ec73961f7
ARTEMIS-474 another fix on JChannelWrapper Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/ec73961f Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/ec73961f Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/ec73961f Branch: refs/heads/master Commit: ec73961f72fc687b2d63987268b335ee5da52874 Parents: a3ae2c4 Author: Clebert Suconic <[email protected]> Authored: Thu Apr 14 21:33:55 2016 -0400 Committer: Clebert Suconic <[email protected]> Committed: Thu Apr 14 21:57:17 2016 -0400 ---------------------------------------------------------------------- .../artemis/api/core/jgroups/JChannelWrapper.java | 11 ++++++++--- .../artemis/core/replication/ReplicationEndpoint.java | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec73961f/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/jgroups/JChannelWrapper.java ---------------------------------------------------------------------- diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/jgroups/JChannelWrapper.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/jgroups/JChannelWrapper.java index 08a8ff8..7851c9a 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/jgroups/JChannelWrapper.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/jgroups/JChannelWrapper.java @@ -47,14 +47,19 @@ public class JChannelWrapper { this.manager = manager; - if (channel.getReceiver() != null) { - logger.warn("The channel already had a receiver previously!!!!", new Exception("trace")); + if (isTrace && channel.getReceiver() != null) { + logger.trace(this + "The channel already had a receiver previously!!!! == " + channel.getReceiver(), new Exception("trace")); } //we always add this for the first ref count channel.setReceiver(new ReceiverAdapter() { @Override + public String toString() { + return "ReceiverAdapter::" + JChannelWrapper.this; + } + + @Override public void receive(org.jgroups.Message msg) { if (isTrace) { logger.trace(this + ":: Wrapper received " + msg + " on channel " + channelName); @@ -85,8 +90,8 @@ public class JChannelWrapper { channel.setReceiver(null); logger.trace(this + "::Closing Channel: " + channelName, new Exception("Trace")); channel.close(); + manager.removeChannel(channelName); } - manager.removeChannel(channelName); } } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec73961f/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicationEndpoint.java ---------------------------------------------------------------------- diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicationEndpoint.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicationEndpoint.java index 3cd5bfd..c5b9851 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicationEndpoint.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicationEndpoint.java @@ -637,7 +637,7 @@ public final class ReplicationEndpoint implements ChannelHandler, ActiveMQCompon Journal journalToUse = getJournal(packet.getJournalID()); if (packet.getRecord() == ADD_OPERATION_TYPE.UPDATE) { if (isTrace) { - logger.trace("Endpoint appendUpdate id = " + packet.getId()); + logger.trace("Endpoint appendUpdate id = " + packet.getId()); } journalToUse.appendUpdateRecord(packet.getId(), packet.getJournalRecordType(), packet.getRecordData(), noSync); }
