diff --git a/activemq-client/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java b/activemq-client/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java index e4f6e38c94..458a82db83 100644 --- a/activemq-client/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java +++ b/activemq-client/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java @@ -621,6 +621,12 @@ public final class OpenWireFormat implements WireFormat { return maxFrameSizeEnabled; } + /** + * Set whether the maxFrameSize check will be enabled. Note this is only applied to this format + * and will NOT be negotiated + * + * @param maxFrameSizeEnabled + */ public void setMaxFrameSizeEnabled(boolean maxFrameSizeEnabled) { this.maxFrameSizeEnabled = maxFrameSizeEnabled; } @@ -636,6 +642,7 @@ public final class OpenWireFormat implements WireFormat { this.setMaxFrameSize(min(preferedWireFormatInfo.getMaxFrameSize(), info.getMaxFrameSize())); info.setMaxFrameSize(this.getMaxFrameSize()); + //Note: Don't negotiate maxFrameSizeEnabled so the client and server can set independently this.stackTraceEnabled = info.isStackTraceEnabled() && preferedWireFormatInfo.isStackTraceEnabled(); info.setStackTraceEnabled(this.stackTraceEnabled); diff --git a/activemq-client/src/main/java/org/apache/activemq/openwire/OpenWireFormatFactory.java b/activemq-client/src/main/java/org/apache/activemq/openwire/OpenWireFormatFactory.java index 5261250886..7ca3d69787 100644 --- a/activemq-client/src/main/java/org/apache/activemq/openwire/OpenWireFormatFactory.java +++ b/activemq-client/src/main/java/org/apache/activemq/openwire/OpenWireFormatFactory.java @@ -207,6 +207,12 @@ public class OpenWireFormatFactory implements WireFormatFactory { this.includePlatformDetails = includePlatformDetails; } + /** + * Set whether the maxFrameSize check will be enabled. Note this is only applied to this factory + * and will NOT be negotiated + * + * @param maxFrameSizeEnabled + */ public void setMaxFrameSizeEnabled(boolean maxFrameSizeEnabled) { this.maxFrameSizeEnabled = maxFrameSizeEnabled; }