[ 
https://issues.apache.org/jira/browse/AMQ-7291?focusedWorklogId=388374&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-388374
 ]

ASF GitHub Bot logged work on AMQ-7291:
---------------------------------------

                Author: ASF GitHub Bot
            Created on: 17/Feb/20 12:39
            Start Date: 17/Feb/20 12:39
    Worklog Time Spent: 10m 
      Work Description: gtully commented on issue #420: AMQ-7291 initialize 
writing to body not needed to set property
URL: https://github.com/apache/activemq/pull/420#issuecomment-586975314
 
 
   I think the change is good, but the pr would  benefit from a little test to 
show the  broken existing behaviour
 
----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

            Worklog Id:     (was: 388374)
    Remaining Estimate: 0h
            Time Spent: 10m

> Message body is read-only exception when setting property on Bytes message 
> ---------------------------------------------------------------------------
>
>                 Key: AMQ-7291
>                 URL: https://issues.apache.org/jira/browse/AMQ-7291
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: JMS client
>    Affects Versions: 5.x
>            Reporter: Jorge Esteban Quilcate Otoya
>            Assignee: Jean-Baptiste Onofré
>            Priority: Major
>             Fix For: 5.16.0, 5.15.12
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> In [Zipkin's Brave instrumentation for JMS 
> clients|https://github.com/openzipkin/brave/tree/master/instrumentation/jms], 
> we are currently having issues on adding properties to ActiveMQ BytesMessage 
> <https://github.com/openzipkin/brave/issues/967>
>  
>  While setting String property on `ActiveMQMessage` works fine, setting 
> String property on `ActiveMQBytesMessage` throws "Message body is read-only 
> exception".
>  
> Checking the source code `ActiveMQMessage` only checks if properties are 
> read-only: 
> [https://github.com/apache/activemq/blob/master/activemq-client/src/main/java/org/apache/activemq/command/ActiveMQMessage.java#L493-L495]
>  
> While `ActiveMQBytesMessage` check if body is read-only when setting 
> property: 
> [https://github.com/apache/activemq/blob/master/activemq-client/src/main/java/org/apache/activemq/command/ActiveMQBytesMessage.java#L917]
>  calling 
> [https://github.com/apache/activemq/blob/master/activemq-client/src/main/java/org/apache/activemq/command/ActiveMQBytesMessage.java#L834]
>  
> Would love if someone can clarify if this is actually a bug and how to deal 
> with this scenario if it is not.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to