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 » how to lookup MQQueueConnectionFactory,MQQueueManager

Post new topic  Reply to topic
 how to lookup MQQueueConnectionFactory,MQQueueManager « View previous topic :: View next topic » 
Author Message
gopal reddy
PostPosted: Thu Mar 02, 2006 6:14 am    Post subject: how to lookup MQQueueConnectionFactory,MQQueueManager Reply with quote

Newbie

Joined: 02 Mar 2006
Posts: 6
Location: India

Hi to all members.I am new to this group.

I am trying to lookup the connection factory and q manager by using the following code.I am doing this lookup from the system where the Websphere AS is running and the MQserver is located on another system.


Hashtable p = new Hashtable();
p.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory");
p.put(Context.PROVIDER_URL, "iiop://localhost:1414");
jndiContext = new InitialContext(p);
mqConnectionFactory = (MQQueueConnectionFactory) jndiContext.lookup("jms/TESTQM");
String qMgr = mqConnectionFactory.getQueueManager();
qManager = new MQQueueManager(qMgr);


I am getting the following exception
MQJE001: Completion Code 2, Reason 2012

can anyone plz help me?
can u plz tell me other means of lookup
Back to top
View user's profile Send private message Send e-mail
vennela
PostPosted: Thu Mar 02, 2006 11:50 am    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

What version of WAS
What kind of program (stand alone or a program running in WAS ?)
What platform (client and server)
Back to top
View user's profile Send private message Send e-mail Visit poster's website
clindsey
PostPosted: Thu Mar 02, 2006 12:13 pm    Post subject: Reply with quote

Knight

Joined: 12 Jul 2002
Posts: 586
Location: Dallas, Tx

Code:

p.put(Context.PROVIDER_URL, "iiop://localhost:1414");


1414 is the listener port for MQ.
The port here for the provider url should be the RMI port from the app server. If WAS is using standard ports (2809) you can leave off the port.

Charlie
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Mar 02, 2006 1:02 pm    Post subject: Reply with quote

Grand High Poobah

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

And if running from inside WAS you can omit the hash table as well:

Code:
Context ctx = new InitialContext();


_________________
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 » how to lookup MQQueueConnectionFactory,MQQueueManager
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.