mattrpav commented on code in PR #2864:
URL: https://github.com/apache/activemq/pull/2864#discussion_r4603720970
##########
activemq-client/src/main/java/org/apache/activemq/command/ActiveMQMessage.java:
##########
@@ -501,6 +525,15 @@ public void setObjectProperty(String name, Object value,
boolean checkReadOnly)
checkValidObject(value);
value = convertScheduled(name, value);
+
+ // Strict Compliance Check For Provider-Set JMSX Properties
+ ActiveMQConnection conn = getConnection();
+ if (checkProviderProperties && conn != null &&
conn.isStrictCompliance()) {
+ if (JMSX_PROVIDER_PROPERTIES.contains(name)) {
+ throw new MessageNotWriteableException("Provider-set JMSX
property '" + name + "' cannot be set by a client under strict compliance.");
Review Comment:
I think you correct and that MNWE should only be used on consumer-side. I'll
dig into the spec and tck to find a better exception type.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact