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 09, 2006 1:34 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://remoteIP:2809");
jndiContext = new InitialContext(p);
mqConnectionFactory = (MQQueueConnectionFactory) jndiContext.lookup("jms/TESTQM");
String qMgr = mqConnectionFactory.getQueueManager();
qManager = new MQQueueManager(qMgr);

i am using websphere 5.
websphere AS and MQ server are both on Windows platform

context factory was created successfully but i am getting ORB exception

can anyone plz help me? which jars are to be added and if possible can u send me sample code.
can u plz tell me other means of lookup
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Thu Mar 09, 2006 12:58 pm    Post subject: Reply with quote

Grand High Poobah

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

Lots of bad karma here.

Do not mix JMS and MQ Base!

You do not access the qmgr in JMS.

Read up and google on JMS
Code:
qconn = qcf.createQueueConnection();
//or
qconn=qcf.createQueueConnection(userid, passwd);


From thereon you go to work with the session and the producers/consumers.....

Enjoy
_________________
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.