ARTEMIS-357 fixing issue with Messages Growing after JMS sends (after my last change on ARTEMIS-357)
This commit is contained in:
parent
ff95b216ef
commit
4d239ac803
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue