ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » How to add MQRFH2 header to the JMSMessage

Post new topic  Reply to topic
 How to add MQRFH2 header to the JMSMessage « View previous topic :: View next topic » 
Author Message
rsinha
PostPosted: Fri Aug 29, 2003 7:22 am    Post subject: How to add MQRFH2 header to the JMSMessage Reply with quote

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
View user's profile Send private message
EddieA
PostPosted: Fri Aug 29, 2003 9:19 am    Post subject: Reply with quote

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
View user's profile Send private message
Wbrant
PostPosted: Fri Sep 26, 2003 9:30 pm    Post subject: mqhrf2 headers Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Wbrant
PostPosted: Sat Sep 27, 2003 11:26 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address
bower5932
PostPosted: Mon Sep 29, 2003 10:45 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

mqjmsusr.java and mqjmssel.java are a couple of programs that manipulate the <usr> folder with a couple of simple values. They can be found at:

http://www.developer.ibm.com/tech/sampmq.html
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » How to add MQRFH2 header to the JMSMessage
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.