activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Tully <gary.tu...@gmail.com>
Subject Re: ActiveMQBytesMessage.setObjectProperty
Date Thu, 01 Sep 2011 10:22:29 GMT
that is from the JMS spec,
3.10 Changing the Value of a Received Message

On 31 August 2011 15:46, jaco <superkruger@gmail.com> wrote:
> Hi all,
>
> I'm having trouble setting a property on a received Message.
> Note that I do not wish to create a new Message but simply set new
> Properties on an existing Message.
>
> in org.apache.activemq.command.ActiveMQBytesMessage, the setObjectProperty
> method invokes 'initializeWriting':
>
> public void setObjectProperty(String name, Object value) throws JMSException
> {
>    initializeWriting();
>    super.setObjectProperty(name, value);
> }
>
> This in turn calls 'checkReadOnlyBody' - which of course fails since the
> Message is read-only - before setting the property.
>
> The question is, why does a message need to have a non-readonly body in
> order to set a property?
>
> This technique works with IBM MQ Messages.
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQBytesMessage-setObjectProperty-tp3781182p3781182.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
http://fusesource.com
http://blog.garytully.com

Mime
View raw message