[
https://issues.apache.org/activemq/browse/AMQ-1457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40332
]
Nic Grounds commented on AMQ-1457:
----------------------------------
As clarification, the property I need to set on the ActiveMQBytesMessage
includes more information than simple the message length (but it is important
the the message length be embedded in this other information).
> Can't set properties on ActiveMQBytesMessage after a reset()
> ------------------------------------------------------------
>
> Key: AMQ-1457
> URL: https://issues.apache.org/activemq/browse/AMQ-1457
> Project: ActiveMQ
> Issue Type: Improvement
> Affects Versions: 4.1.1, 5.0.0
> Reporter: Nic Grounds
> Attachments: propertyAfterReset.patch
>
>
> Once the reset() method has been called on an ActiveMQBytesMessage object,
> properties can no longer be set. The use case is that I need to set a
> property to represent the message length (number of bytes) but I can't
> determine that (using the getBodyLength() method) until after a call to
> reset().
> A very crude patch is included which prevents the [unnecessary?] assumption
> that the ActiveMQBytesMessage may be uninitialized when setting an object
> property.
> Note: the documentation for a JMS BytesMessage API documentation states that
> the reset() method puts the BytesMessage into read-only mode but whether this
> applies to the body only or to the body and properties is unclear.
> I marked this issue as an improvement because I'm not convinced whether it is
> a bug or whether there is a another, better way to accomplish what I'm trying
> to do.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.