jeanouii commented on code in PR #2864:
URL: https://github.com/apache/activemq/pull/2864#discussion_r4602410910
##########
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:
@mattrpav Saw your comment on the other PR, but could not find where the
spec requires this particular exception. Bellow we use MessageFormatException,
could be JMSException.
For my own knowledge, if you have the answer.
--
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