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 » JMS question

Post new topic  Reply to topic
 JMS question « View previous topic :: View next topic » 
Author Message
mqmaniac
PostPosted: Wed Jul 09, 2008 5:51 am    Post subject: JMS question Reply with quote

Master

Joined: 27 Dec 2005
Posts: 201

I am using the Following code snippet


static String QUEUE_NAME =null;
static String QUEUE_MANAGER=null;


QUEUE="SENDER";
QMGR="SENDER_QUEUEMANAGER";


msg.setJMSReplyTo("queue://QMGR/QUEUE");
msg.setStringProperty("StringTag1", "Tag1Value1");

I am not sure on how to SET a property to NOT to SEND the RFH Header as the recieving end is a .NET Application.

Can someone tell me

a.)Are the MQMD.replytoQueue and MQMD.replytoqueuemanager automatically set from the URI when i send it to queue??

b.)How can the clinet read the Property (StringTag1) ??
Thanks in advance!!!
Back to top
View user's profile Send private message
sridhsri
PostPosted: Wed Jul 09, 2008 6:40 am    Post subject: Reply with quote

Master

Joined: 19 Jun 2008
Posts: 297

As far as I understand, you can use the setString and other set properties only with MQFRH2 headers.

If you don't want to send the RFH2 header then you might want to URL like this: queue://<QMGRname>/<QueueName>?targetClient=1

you also mention that since you have a .Net application, you don't want RFH2 headers. I don't think that is necessary. You could use the XMS Client for .Net. This give you JMS like APIs in .Net and you can use similar getString or other get properties in .net. The XMS Client for .Net is free and available in the MQ Support page.
Back to top
View user's profile Send private message
mqmaniac
PostPosted: Wed Jul 09, 2008 7:30 am    Post subject: Reply with quote

Master

Joined: 27 Dec 2005
Posts: 201

Thanks for the reply sridhsri!

I am confused on One thing tho...

you mentioned that the SetpropertySetReplyto can be used against MQRFH2 Header Only,..

What Shd i do If I want the MQMD properties to be Set,..
I used the follwoing link

http://middleware.its.state.nc.us/middleware/Documentation/en_US/htm/csqzaw09/csqzaw0937.htm#FIGJMSMAP2

and Assumed that the SEND method form the MDB would actually Map the JMS Hearders and Properties back to MQMD,..

Pls Suggest!!!
Back to top
View user's profile Send private message
sridhsri
PostPosted: Wed Jul 09, 2008 8:27 am    Post subject: Reply with quote

Master

Joined: 19 Jun 2008
Posts: 297

Sorry. I think I didn't explain it well. I meant to say that setString, setInt and other set would work only with MQRFH2.

From what I understand, you are using a JMS Application to put a message on queue. In that application if you set the replyToQ (a JMS property) it would be set in the MQRFH2 (I could be wrong here).

If you use MQJava to put a message on the queue, you would have access to MQMD and therefore you could set the replyToQ in the MQMD.

The way I understand it is that in JMS there is nothing called MQMD or even MQRFH2. There is just the JMS Header based on the JMS Specification. When IBM implements this specification on MQ, it might choose to use MQRFH2. So, if you are writing a JMS application, don't look to access the MQMD or RFH2 headers. Stick to what is available in the JMS spec
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Jul 09, 2008 11:12 am    Post subject: Reply with quote

Grand High Poobah

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

Code:
Destination myreplyto = receivedmsg.getJMSReplyTo();
MessageProducer myproducer = Session.createProducer(null);
myproducer.send(myreplyto, replymsg);


And this is how the MDB should handle the reply.

The sender set the JMSReplyTo:
Code:
 Destination myreplyto = (Destination) ctx.lookup("ReplyToQueue");
requestmsg.setJMSReplyTo(myreplyto);


And guys please look up a JMS tutorial as this is elementary JMS.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
zpat
PostPosted: Wed Jul 09, 2008 9:37 pm    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Set targetclient to non JMS on the queue object.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Jul 10, 2008 1:23 pm    Post subject: Reply with quote

Grand High Poobah

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

zpat wrote:
Set targetclient to non JMS on the queue object.
As you retrieve the Destinations from JNDI this should already have been done in the JNDI layer and you should not have to code for it.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

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