Author |
Message
|
espin |
Posted: Fri Feb 18, 2011 7:25 am Post subject: |
|
|
Newbie
Joined: 17 Feb 2011 Posts: 9
|
My code:
Code: |
outQueue = queueSession.createQueue(channelProperties.getMqOut());
((JmsDestination)outQueue).setBooleanProperty(WMQConstants.WMQ_MQMD_WRITE_ENABLED, true);
((JmsDestination)outQueue).setIntProperty(WMQConstants.WMQ_TARGET_CLIENT,WMQConstants.WMQ_CLIENT_NONJMS_MQ);
// ((JmsDestination)outQueue).setBooleanProperty(WMQConstants.WMQ_TARGET_CLIENT_MATCHING,true);
|
|
|
Back to top |
|
 |
espin |
Posted: Fri Feb 18, 2011 7:52 am Post subject: |
|
|
Newbie
Joined: 17 Feb 2011 Posts: 9
|
Hi gentleman again! +)
First of all thank you very much for your help and assistance.
As I could understand you there are no problem to implement the message with RHF2 header using native java methods. Ok, probably no difficulties with that approach...
But, unfortunately, I would like to do this using JMS...
The IBM documentation says that it is possible...
I can't see why the IBM's library doesn't allow this +(
It will be very appreciate if some one from you give me the example (part of code) of java code which able to send the massage with RHF2 header.
Thank you, guys.
PS
Please, excuse my for my english... I am foreigner speaker and english isn't my native language. |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Feb 18, 2011 7:58 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
If you have explicitly set the targetClient as fjb_saper has said, then at the MQ v6 level, the message *will* have an MQRFH2 on it.
At MQv7, the JMSMessage will be mapped differently, to a message that has MQ v7 Message Properties on it. These messages can be turned into messages that have MQRFH2 headers on them when they move to a v6 environment. So this may explain what you are seeing - the message has properties but not an RHF2. But the data is still contained in the message.
But any application that is using JMS to read these messages will receive 'the right' thing. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Feb 18, 2011 8:00 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
espin wrote: |
As I could understand you there are no problem to implement the message with RHF2 header using native java methods. |
No, I said the exact opposite. I said to use JMS, and there are any number of JMS examples on the web. Including the one posted earlier in this thread for your assistance. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
espin |
Posted: Fri Feb 18, 2011 8:16 am Post subject: |
|
|
Newbie
Joined: 17 Feb 2011 Posts: 9
|
mqjeff, Vitor, thanks a lot!
I would like to take a pause in our discussion and try locating the examples in earlier posts.
Thanks all of you for your help! |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Feb 18, 2011 2:41 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Quote: |
((JmsDestination)outQueue).setIntProperty(WMQConstants.WMQ_TARGET_CLIENT,WMQConstants.WMQ_CLIENT_NONJMS_MQ); |
By using the WMQ_CLIENT_NONJMS_MQ constant you tell the system to suppress your RFH header.
You need to set the constant to WMQ_CLIENT_JMS or its equivalent!
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
espin |
Posted: Mon Feb 21, 2011 12:05 am Post subject: |
|
|
Newbie
Joined: 17 Feb 2011 Posts: 9
|
Hi, fjb_saper!
I have changed the constant according your recommendation:
Code: |
((JmsDestination)outQueue).setBooleanProperty(WMQConstants.WMQ_MQMD_WRITE_ENABLED, true); ((JmsDestination)outQueue).setIntProperty(WMQConstants.WMQ_TARGET_CLIENT,WMQConstants.WMQ_CLIENT_JMS_COMPLIANT);
|
and miracle was arrived at my home!!!
The problem with messages having the RFH2 header was disappeared at all!
Special thanks to fjb_saper for extremely clear explanation.
The question is closed +) |
|
Back to top |
|
 |
Vitor |
Posted: Mon Feb 21, 2011 5:08 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
espin wrote: |
The problem with messages having the RFH2 header was disappeared at all! |
Leaving you with the problem of all the non-MQMD JMS information disappearing.
But if it works for you...
If your problem was that you didn't want an RFH2, why were you so insistent on an example of setting the <usr> tags in an RFH2?  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Feb 21, 2011 7:18 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Vitor wrote: |
espin wrote: |
The problem with messages having the RFH2 header was disappeared at all! |
Leaving you with the problem of all the non-MQMD JMS information disappearing.
But if it works for you...
If your problem was that you didn't want an RFH2, why were you so insistent on an example of setting the <usr> tags in an RFH2?  |
Take into account his poor mastery of the English language.
I am sure he meant to say:
The problem with messages not having the expected RFH2 header was solved.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Vitor |
Posted: Mon Feb 21, 2011 7:22 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
fjb_saper wrote: |
Take into account his poor mastery of the English language. |
Oh, I'm happy with any solution that meets the OP's requirements. Big fan of things working I am.
Simply trying to get my head round the situation & reassure myself I was answering the question asked and not what I thought was being asked. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|