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 » Problem with JMS when replying to NON-JMS application.

Post new topic  Reply to topic
 Problem with JMS when replying to NON-JMS application. « View previous topic :: View next topic » 
Author Message
Amar Tayade
PostPosted: Wed Jul 14, 2004 9:07 pm    Post subject: Problem with JMS when replying to NON-JMS application. Reply with quote

Newbie

Joined: 22 Nov 2002
Posts: 9

My application is a Generic code so that any System can be joined to it thru MQ just changing configuration from web page on my app server . No need to change any code.

Platform : Sun Solaris/ WMQ with JMS & JNDI/ Websphere 3.5

We came across a prolem where we need to join a non-JMS application for the first time. The incoming message is in MQSTR format but outgoing reply message from my application is in MQRFH2 format . MQRFH2 format is making this message to fail at MQSI HUB( which comes into picture between these two appliactions).

I thought of setting Targetclient to Non-Jms while replying back so that format will be MQSTR but I am afraid this will change settings for already existing application to which we are replying (as code is generic)

Is there any way I can handle this without changing anything in my code.
(Thru JNDI or something ?)If not can I expect MQSI HUB to handle converstion between MQRFH2 to MQSTR ?

Thanx
Amar
Back to top
View user's profile Send private message Yahoo Messenger
jefflowrey
PostPosted: Thu Jul 15, 2004 5:07 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Yes, you can remove MQRFH2 headers using any version of MQSI that I'm aware of.

That is, I know you can do this with WMQI (or WMQIB) version 2.1 and WBIMB version 5.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
EddieA
PostPosted: Thu Jul 15, 2004 9:10 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Quote:
MQRFH2 format is making this message to fail at MQSI HUB

Unless the Flow is using BLOB, this should not cause a problem. WMQI fully understands RFH2 headers, and keeps them in a seperate part of the tree.

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
fjb_saper
PostPosted: Thu Jul 15, 2004 11:49 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

You are talking about a JMS application:

Change your JNDI settings for the queue.
Specify for the queue to be an MQ queue and not a JMS queue.
Check out and change the corresponding attribute in JNDI.
Had to do it manually to make it stick in WAS.
This will avoid putting the RFH2 header on the queue.

Enjoy
Back to top
View user's profile Send private message Send e-mail
kiran_tala
PostPosted: Fri Jul 16, 2004 10:57 am    Post subject: Reply with quote

Novice

Joined: 16 Jul 2004
Posts: 14

((com.ibm.mq.jms.MQQueue)ioQueue).setTargetClient(com.ibm.mq.jms.JMSC.MQJMS_CLIENT_NONJMS_MQ);
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Jul 16, 2004 11:05 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

fjb and kiran...

Amar specifically said he does not want to change his destination type, because he doesn't want to break his JMS aware applications. He just wanted to make sure that his broker could handle the RFH2 header.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sat Jul 17, 2004 10:05 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Jeff,

Quote:
Is there any way I can handle this without changing anything in my code.
(Thru JNDI or something ?)If not can I expect MQSI HUB to handle converstion between MQRFH2 to MQSTR ?

There is nothing to prevent you from having 2 JNDI definitions of the same MQQueue. One with type JMS one with type MQ.

Now when you post to the JMS one you will get the RFH2 header and posting to the non JMS (MQ) one you will not get the header.

This change is not in the queue definition it is just part of JNDI.

Thus no need to change any code.

I just hope he coded a different JMS destination for his JMS and non JMS application. If not some code changes (minor) will be required.

Looking at changes this should be less invasive than having to change the broker to handle the RFH2 header.
It will allow for his design on the broker to be unchanged and his JMS application will not need to care.
Just look up a different JMS destination as to his JMS target and his non JMS target.

No change in coding.

Thanks
F.J.
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Sat Jul 17, 2004 10:19 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

fjb_saper...
Amar Tayade wrote:
I thought of setting Targetclient to Non-Jms while replying back so that format will be MQSTR but I am afraid this will change settings for already existing application to which we are replying (as code is generic)


So, again... the original poster doesn't want to change his target client - as it might cause his other applications to break.

But it also might not - it depends on how they are coded - and only Amar knows that for sure!

But the big thing is, whatever broker he is also sending his messages to will understand the MQRFH2, and process it just fine. So he doesn't have to change his target client. And if he's using a transformational broker (WBIMB, WMQI, MQSI, Interchange, Workflow but NOT Event Broker or the support pack) then he should be able to remove the RFH2 header with logic inside the broker.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Sat Jul 17, 2004 10:24 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

fjb_saper, now his code will no longer be generic, simply responding to the Repky To info for every message coming in. How is he going to know if the current Reply Message is going to be destined for MQ or JMS? Without hard coding logic that says if it needs to go back to XYZ then ot needs a header, if it goes back to ABC it doesn't, etc.

But, if he simply always includes the header, its no big deal if a non JMS app first routes itself through WBIMB, which can add the header to the request going in, and strip it on the reply coming back. Now both the requesting app and the replying app are not changed, one of the main reason for using WBIMB.

Now, of course if his shop does not have WBIMB, is it worth spending all that $$$ if you could just hard code it for this one case? Maybe. But you KNOW that next month or year another app will have the same problem, and pretty soon your generic service style apps have so much hard coded exception code stuck in them you have defeated the whole purpose of having generic service style apps.

Both ways will work (Jeff's and fjb_saper's), but Jeff's is looking ahead long term.

My 2 cents....
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sat Jul 17, 2004 10:46 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Hi Peter,

No problem. Great advice.
As we are not running any broker (I guess one of those other $$$ decisions) I have no way to judge the effort of setting up the broker to discard / apply an RFH2 header.

I must confess I was looking for a quick fix to make it work now, leaving the long term fix in Amar's hand.

If the effort for dealing with the RFH2 header on the broker side is less than 5 min, you do not want to change anything on the WAS Side.

Thanks again Peter for looking out for the long term.
F.J.
Back to top
View user's profile Send private message Send e-mail
Amar Tayade
PostPosted: Thu Jul 22, 2004 7:29 pm    Post subject: Problem with JMS when replying to NON-JMS application. Reply with quote

Newbie

Joined: 22 Nov 2002
Posts: 9

My apology for not replying on this forum earlier. This problem was resolved the next day during a debugging call with hub team and hence.....

There was no change from my application side. Everything was handled by MQSI hub with their changes .

I really appreciate immediate replies I got from Grandmasters.

Thanx
Amar
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Problem with JMS when replying to NON-JMS application.
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.