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 » RFH2 headers?

Post new topic  Reply to topic
 RFH2 headers? « View previous topic :: View next topic » 
Author Message
JMSnewbie_2008
PostPosted: Mon Mar 31, 2008 2:22 am    Post subject: RFH2 headers? Reply with quote

Newbie

Joined: 27 Mar 2008
Posts: 3

I have existing code which makes use of the WebSphere MQ native specific API's..

I need to convert this code to standard JMS so that it will work with multiple JMS providers like activeMQ , Swift MQ along with WebSphere MQ..

if (msgFormat.equals(MQC.MQFMT_RF_HEADER_2.trim())) {
System.out.println("Stripping out RFH2 Header...");
....
} else {
msg.readFully(bytes);
message = new String(bytes);
}

My questions are that
What is the need for the RFH2 header? (sorry i am a newbie)
I would like to remove the dependency of code on RFH2 processing so that i can make my code generic..
Is it possible for me to do this using standard JMS?
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Mar 31, 2008 2:28 am    Post subject: Re: RFH2 headers? Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

JMSnewbie_2008 wrote:
What is the need for the RFH2 header? (sorry i am a newbie)


The RFH2 is where WMQ stores the JMS header information. It's what distingishes (in broad terms) a message processed using the standard API from one processed using JMS or JMS-like technology.

JMSnewbie_2008 wrote:
I would like to remove the dependency of code on RFH2 processing so that i can make my code generic..


If you convert to using JMS then the RFH2 is mandatory, and handled for you under the covers by the JMS libraries.

JMSnewbie_2008 wrote:
Is it possible for me to do this using standard JMS?


WMQ provides a standard JMS interface, which results in an RFH2 on your message invisible to your application. The only time the RFH2 becomes an issue is if you have a mix of JMS/non-JMS applications.

the Using Java manual (or it's online equivalent) which explains all this in detail, including how the JMS headers are mapped onto the RFH2 & MQMD.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
JMSnewbie_2008
PostPosted: Mon Mar 31, 2008 4:37 am    Post subject: Re: RFH2 headers? Reply with quote

Newbie

Joined: 27 Mar 2008
Posts: 3

Hello,

Thank you so much for ur reply.

If RFH2 is handled under the covers by the JMS libraries -
This means that if i send and receive javax.jms.TextMessage i don't need to worry about the RFH2 header like i was doing when i used com.ibm.mq.MQMessage?
i.e i) stripping out the RFH2 header from message that is read
ii) explicitly creating RFH2 Header For message before sending

I will go through the Java manual which explains how the JMS headers are mapped onto the RFH2 & MQMD.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Mar 31, 2008 4:46 am    Post subject: Re: RFH2 headers? Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

JMSnewbie_2008 wrote:
This means that if i send and receive javax.jms.TextMessage i don't need to worry about the RFH2 header like i was doing when i used com.ibm.mq.MQMessage?


As I said, the RFH2 is only apparent if you're mixing JMS & non-JMS applications. If the JMS apps in question had specified TARGCLIENT correctly, you wouldn't have needed to worry about it using the other method either.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » RFH2 headers?
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.