activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [1/4] activemq-artemis git commit: ARTEMIS-357 fixing issue with Messages Growing after JMS sends (after my last change on ARTEMIS-357)
Date Wed, 27 Jan 2016 19:41:02 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master fa368de5f -> 53044dea1


ARTEMIS-357 fixing issue with Messages Growing after JMS sends (after my last change on ARTEMIS-357)


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

Branch: refs/heads/master
Commit: 4d239ac80355a9eabec99683b11e1c6c308e39c8
Parents: ff95b21
Author: Clebert Suconic <clebertsuconic@apache.org>
Authored: Tue Jan 26 22:30:24 2016 -0500
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Wed Jan 27 13:21:17 2016 -0500

----------------------------------------------------------------------
 .../core/buffers/impl/ResetLimitWrappedActiveMQBuffer.java       | 4 ++--
 .../activemq/artemis/core/client/impl/ClientMessageImpl.java     | 2 +-
 .../apache/activemq/artemis/core/message/impl/MessageImpl.java   | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4d239ac8/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/buffers/impl/ResetLimitWrappedActiveMQBuffer.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/buffers/impl/ResetLimitWrappedActiveMQBuffer.java
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/buffers/impl/ResetLimitWrappedActiveMQBuffer.java
index b3cdfe1..61ecef6 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/buffers/impl/ResetLimitWrappedActiveMQBuffer.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/buffers/impl/ResetLimitWrappedActiveMQBuffer.java
@@ -45,7 +45,7 @@ public final class ResetLimitWrappedActiveMQBuffer extends ChannelBufferWrapper
    public ResetLimitWrappedActiveMQBuffer(final int limit, final ActiveMQBuffer buffer, final
MessageInternal message) {
       // a wrapped inside a wrapper will increase the stack size.
       // we fixed this here due to some profiling testing
-      super(unwrap(buffer.byteBuf()));
+      super(unwrap(buffer.byteBuf()).duplicate());
 
       this.limit = limit;
 
@@ -53,7 +53,7 @@ public final class ResetLimitWrappedActiveMQBuffer extends ChannelBufferWrapper
          writerIndex(limit);
       }
 
-      buffer.readerIndex(limit);
+      readerIndex(limit);
 
       this.message = message;
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4d239ac8/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientMessageImpl.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientMessageImpl.java
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientMessageImpl.java
index 7668251..31d9aad 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientMessageImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientMessageImpl.java
@@ -136,7 +136,7 @@ public class ClientMessageImpl extends MessageImpl implements ClientMessageInter
 
    @Override
    public int getBodySize() {
-      return buffer.writerIndex() - buffer.readerIndex();
+      return getBodyBuffer().writerIndex() - getBodyBuffer().readerIndex();
    }
 
    @Override

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4d239ac8/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/MessageImpl.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/MessageImpl.java
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/MessageImpl.java
index e7c33ff..ca52621 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/MessageImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/MessageImpl.java
@@ -448,7 +448,7 @@ public abstract class MessageImpl implements MessageInternal {
    @Override
    public int getEndOfBodyPosition() {
       if (endOfBodyPosition < 0) {
-         endOfBodyPosition = buffer.writerIndex();
+         endOfBodyPosition = getBodyBuffer().writerIndex();
       }
       return endOfBodyPosition;
    }


Mime
View raw message