[prev in list] [next in list] [prev in thread] [next in thread] 

List:       activemq-users
Subject:    ActiveMQBytesMessage.setObjectProperty
From:       jaco <superkruger () gmail ! com>
Date:       2011-08-31 14:46:53
Message-ID: 1314802013407-3781182.post () n4 ! nabble ! com
[Download RAW message or body]

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.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic