|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
How to add MQRFH2 header to the JMSMessage |
« View previous topic :: View next topic » |
Author |
Message
|
rsinha |
Posted: Fri Aug 29, 2003 7:22 am Post subject: How to add MQRFH2 header to the JMSMessage |
|
|
Apprentice
Joined: 29 Aug 2003 Posts: 42
|
I guess, by default JMS does add it to the message. Does it mean, the trading partner who's not using JMS, will not be able to procees the message? Also, if I want to add some name value pair to this header (I guess that goes in the <usr> folder of the header), what are the function calls to do that? Similarly, if the trading partner has sent the RFH2 header, how do I retrieve those application specific values from within JMS? |
|
Back to top |
|
 |
EddieA |
Posted: Fri Aug 29, 2003 9:19 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
If you know the recipient is not JMS, then you can tell JMS not to add the RFH2 header when PUTting a message.
Yes, the name/value pairs go into the <usr> folder. Take a look at the getXXXXProperty and setXXXXProperty methods of Message.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
Wbrant |
Posted: Fri Sep 26, 2003 9:30 pm Post subject: mqhrf2 headers |
|
|
Novice
Joined: 22 Aug 2003 Posts: 10
|
I am looking for a piece of sample code that will show me show to set
the custom properties in the usr folder. I currenlty have a small jms client that sets a property but it does not show up when i retrieve the message or when i view the messages in the mq explorer.
Can anyone help?
TIA
 |
|
Back to top |
|
 |
Wbrant |
Posted: Sat Sep 27, 2003 11:26 am Post subject: |
|
|
Novice
Joined: 22 Aug 2003 Posts: 10
|
have added few String properties in the message and send it to MQ Version
5.3 using JMS. It was added to the Queue Sucessfully. But when I read the message back and tried to
extract these Properties, it was returing NULL. I tried to print all the Properties.
These are the total properties available in the message. {JMS_IBM_PutDate=20030711,
JMSXAppID=Websphere MQ Client for Java, JMS_IBM_PutApplType=28, JMS_IBM_Format=MQSTR ,
JMSXUserID=MUSR_MQADMIN, JMS_IBM_MsgType=8, JMS_IBM_PutTime=20051043, JMSXDeliveryCount=1}
These are the total properties available in the message.
I dont know If I have to set anything in MQ or in Java Client while creating the Queue/Queue
Manager. Please help.
The code I'm using to retrive the prpertieis is:
public void run() {
String msgBody, xptName;
runFlag = true;
try {
while (runFlag) {
try {
//get message from Q
TextMessage mqMessage = ((TextMessage) (receiver.receive()));
msgBody = mqMessage.getText();
xptName = mqMessage.getStringProperty("EXCEPTION_NAME");
 |
|
Back to top |
|
 |
bower5932 |
Posted: Mon Sep 29, 2003 10:45 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|