This is an automated email from the ASF dual-hosted git repository.
cshannon pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq.git
The following commit(s) were added to refs/heads/main by this push:
new 19949e3 [AMQ-8412] - Add some comments for maxFrameSizeEnabled
19949e3 is described below
commit 19949e36bce4ad19ee811093b141db2f616090b9
Author: Christopher L. Shannon (cshannon) <[email protected]>
AuthorDate: Mon Feb 7 08:45:28 2022 -0500
[AMQ-8412] - Add some comments for maxFrameSizeEnabled
---
.../src/main/java/org/apache/activemq/openwire/OpenWireFormat.java | 7 +++++++
.../java/org/apache/activemq/openwire/OpenWireFormatFactory.java | 6 ++++++
2 files changed, 13 insertions(+)
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 cdda5ac..f1ec271 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 5261250..7ca3d69 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;
}