activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From BenXS <bxsto...@yahoo.co.uk>
Subject How to insert from Java a new JMSproperty in header? setStringProperty() does not work
Date Thu, 19 Aug 2010 10:46:50 GMT

I am trying to set from a Java bean a new (additional) Property in header.
Therefore I code (simplified) the following:


public void pass(Message mess) {
   ...
   mess.setPropertiesModifiable(true);
   mess.setStringProperty("newprop", "value123");
   ...}
   
But it didn't work.

Compiler complains about cannot find symbol for "setPropertiesModifiable".

If omit it the setPropertiesModifiable() statement then at runtime I get an
exception
java.jms.MessageNotWriteableException: Message properties are read only

So how do I resolve that?

Ben
-- 
View this message in context: http://old.nabble.com/How-to-insert-from-Java-a-new-JMSproperty-in-header--setStringProperty%28%29-does-not-work-tp29480597p29480597.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message