|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
how to lookup MQQueueConnectionFactory,MQQueueManager |
« View previous topic :: View next topic » |
Author |
Message
|
gopal reddy |
Posted: Thu Mar 02, 2006 6:14 am Post subject: how to lookup MQQueueConnectionFactory,MQQueueManager |
|
|
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 |
|
 |
vennela |
Posted: Thu Mar 02, 2006 11:50 am Post subject: |
|
|
 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 |
|
 |
clindsey |
Posted: Thu Mar 02, 2006 12:13 pm Post subject: |
|
|
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 |
|
 |
fjb_saper |
Posted: Thu Mar 02, 2006 1:02 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|