activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jaco <>
Subject ActiveMQBytesMessage.setObjectProperty
Date Wed, 31 Aug 2011 14:46:53 GMT
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
    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:
Sent from the ActiveMQ - User mailing list archive at

View raw message