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 » Can I setJMSReplyto without doing a ctx lookup ?

Post new topic  Reply to topic
 Can I setJMSReplyto without doing a ctx lookup ? « View previous topic :: View next topic » 
Author Message
WBI_user
PostPosted: Wed Sep 14, 2005 5:53 am    Post subject: Can I setJMSReplyto without doing a ctx lookup ? Reply with quote

Partisan

Joined: 07 Aug 2001
Posts: 386

I am new to java and JMS. I like to send my replyto information to my target queue manager.

Most samples I saw so far do:
//set reply to destination
Queue replyQ = (Queue)ctx.lookup(jmsReplyQ);
mymsg.setJMSReplyTo(replyQ);

Can some one tell me how I can setJMSReplyto without doing a lookup.

The target is running non JMS appls. All they want is just a string

I tried
mymsg.setJMSReplyTo("MQmgr.MyQ");

setJMSReplyTo(javax.jms.Destination) in javax.jms.Message can
not be applied to (java.lang.String)
mymsg.setJMSReplyTo("MQmgr.MyQ");

I know that this is because JMSReplyTo needs a java type of Destination not string.

Any help ?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Sep 14, 2005 6:07 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.csqzaw.doc/jms11ds.htm
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
WBI_user
PostPosted: Wed Sep 14, 2005 6:29 am    Post subject: Reply with quote

Partisan

Joined: 07 Aug 2001
Posts: 386

Thks jefflowrey,
I got it working now after reading the info provided. Just don't understand why I have to create a queue session just to pass the replyto info. It seems unnecessary. Perhaps this is the JMS spec.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun Oct 09, 2005 4:51 am    Post subject: Reply with quote

Grand High Poobah

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

WBI_user wrote:
Thks jefflowrey,
I got it working now after reading the info provided. Just don't understand why I have to create a queue session just to pass the replyto info. It seems unnecessary. Perhaps this is the JMS spec.


JMS and best practices give you a few possibilities:
a) -- extract from context
b) -- create dynamic queue from session
c) -- create from session using URI identifier
e) -- create from session on local qm by passing just the queue name

Enjoy
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 » Can I setJMSReplyto without doing a ctx lookup ?
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.