• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Set JMSX properties in TextMessage using MQ

 
Ranch Hand
Posts: 281
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it possible to call setter on the the properties that start with JMSX.

For example, properties like JMSXUserID, JMSXAppID, JMSXDeliveryCount cannot be set.

I have a need to seting an additional property on a read only message that comes from clinet. In order to do that, I have to first clear out all the properties, put them back and add new property.

I can set all the properties back into the message other than the ones that start with JMSX.

theMsg.setStringProperty("JMSXUserID","xxx");
theMsg.setStringProperty("JMSXAppID","yyy");
theMsg.setStringProperty("JMSXDeliveryCount","1");

All the lines above throw Exception:

javax.jms.MessageFormatException: MQJMS1058: Invalid message property name: JMSXUserID

or,

javax.jms.MessageFormatException: MQJMS1058: Invalid message property name: JMSXAppID

or,

javax.jms.MessageFormatException: MQJMS1058: Invalid message property name: JMSXDeliveryCount

Are JMSX reserved so that they can NOT be set?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic