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) {
|
public ResetLimitWrappedActiveMQBuffer(final int limit, final ActiveMQBuffer buffer, final MessageInternal message) {
|
||||||
// a wrapped inside a wrapper will increase the stack size.
|
// a wrapped inside a wrapper will increase the stack size.
|
||||||
// we fixed this here due to some profiling testing
|
// we fixed this here due to some profiling testing
|
||||||
super(unwrap(buffer.byteBuf()));
|
super(unwrap(buffer.byteBuf()).duplicate());
|
||||||
|
|
||||||
this.limit = limit;
|
this.limit = limit;
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ public final class ResetLimitWrappedActiveMQBuffer extends ChannelBufferWrapper
|
||||||
writerIndex(limit);
|
writerIndex(limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
buffer.readerIndex(limit);
|
readerIndex(limit);
|
||||||
|
|
||||||
this.message = message;
|
this.message = message;
|
||||||
}
|
}
|
||||||
|
|
|
@ -136,7 +136,7 @@ public class ClientMessageImpl extends MessageImpl implements ClientMessageInter
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getBodySize() {
|
public int getBodySize() {
|
||||||
return buffer.writerIndex() - buffer.readerIndex();
|
return getBodyBuffer().writerIndex() - getBodyBuffer().readerIndex();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -448,7 +448,7 @@ public abstract class MessageImpl implements MessageInternal {
|
||||||
@Override
|
@Override
|
||||||
public int getEndOfBodyPosition() {
|
public int getEndOfBodyPosition() {
|
||||||
if (endOfBodyPosition < 0) {
|
if (endOfBodyPosition < 0) {
|
||||||
endOfBodyPosition = buffer.writerIndex();
|
endOfBodyPosition = getBodyBuffer().writerIndex();
|
||||||
}
|
}
|
||||||
return endOfBodyPosition;
|
return endOfBodyPosition;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue