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 » General Discussion » Wildcard, MQ Channel Table and JMS

Post new topic  Reply to topic
 Wildcard, MQ Channel Table and JMS « View previous topic :: View next topic » 
Author Message
avakado
PostPosted: Wed Mar 25, 2009 9:47 am    Post subject: Wildcard, MQ Channel Table and JMS Reply with quote

Newbie

Joined: 19 Mar 2009
Posts: 5

We have an application deployed to WebSphere 6.1 that uses a channel table to connect to WMQ. In the QCF definition, we specified the queue manager name as *QM, Client as the transport type, and a custom property for the channel table location named CDDTURL. We have two queue managers QM1 and QM2 remote to WAS. This configuration is being used for failover at the MQ level.

The application uses a request / reply messaging pattern.

Everything is working when the target client for the JMS request queue is set to MQ, but when we change to JMS it fails.

In the RFH2 header, the RTO field gets populated as: queue:///REPLYTO.Q
However, the MQ header has the correct Reply Q and Reply to QMgr.

We can not set the base queue manager property in JNDI for the reply queue, since we do not know which queue manager we will connect to (in case of failover).

Is there anyway to obtain the queue manager name so that we can set the JMS ReplyTo field on the request message or another other solution?

Thanks,

avakado
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Mar 26, 2009 3:56 pm    Post subject: Reply with quote

Grand High Poobah

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

Bizarre. I would like to know how you look at the JMSReplyto destination and how you populate it....
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
avakado
PostPosted: Thu Mar 26, 2009 11:36 pm    Post subject: Reply with quote

Newbie

Joined: 19 Mar 2009
Posts: 5

fjb_saper,

we tried the following:

Queue replyQueue = (Queue)ctx.lookup("jms/reply");
Destination replyQueue2 = queueSession.createTemporaryQueue();
Destination replyQueue3 = queueSession.createQueue("REPLYTO.Q");
outMessage.setJMSReplyTo(replyQueueX);

Note that queueSession.createTemporaryQueue() works when the target client is JMS or MQ. It creates the correct RTO field in the RFH2 header with the correct queue manager name.


Queue replyQueue = (Queue)ctx.lookup("jms/reply"); - only works with the base queue manager name is populated in the JNDI definition. Unfortunately, this will not work for us, since we do not know the queue manager name prior to execution.

The third option does not help.

avakado
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sat Mar 28, 2009 1:47 pm    Post subject: Reply with quote

Grand High Poobah

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

Try following:

Code:
Queue replytoQueue = (Queue)ctx.lookup("jms/replytoqueue");
String strqueue = replytoQueue.getName();  // you get the uri form
Queue replyQueue = session.createQueue(strqueue);
msg.setJMSReplyTo(replyQueue);

As the queue was created from the URI you should be able to get the qmgr in the Reply to. Didn't try it so no guarantees.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
avakado
PostPosted: Sun Mar 29, 2009 6:56 am    Post subject: Reply with quote

Newbie

Joined: 19 Mar 2009
Posts: 5

fjb_saper,

Unfortunately that did not work. The JMS spec doesn' t mention if the complete URI needs to be returned when createQueue is called. The method does not create an actual physical queue like createTemporaryQueue.

avakado
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun Mar 29, 2009 10:24 am    Post subject: Reply with quote

Grand High Poobah

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

You have to experiment a little. In JMS, some of the stuff, like the replyto Destination is only final after the put of the message (call of the send method). The put itself is supposed to add the qmgr name. For this to happen right, I suppose the Destination needs to be created by the relevant session. Have fun
_________________
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 » General Discussion » Wildcard, MQ Channel Table and JMS
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.