• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JMS header question

 
vivien siu
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guys,

can somebody tell me how can I add a user-defined value, say Versionid in the JMS Mmessage header? this will be sent back to a non-JMS MQ.

is it something like this?:

new MQQueue().setTargetClient(JMSC.MQJMS_CLIENT_NONJMS_MQ);
msg.setString Property("Versionid", "V1.0");
[ June 08, 2006: Message edited by: vivien siu ]
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'll move this question to the EJB/J2EE forum, where JMS is discussed.
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have got it right.
 
vivien siu
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if the msg object is of class TextMessage, it will still work right?
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by vivien siu:
if the msg object is of class TextMessage, it will still work right?


It works for all message types.
 
vivien siu
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok, thanks
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic