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.

Reply via email to