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 » Connect to a queue manager on different machine using java

Post new topic  Reply to topic
 Connect to a queue manager on different machine using java « View previous topic :: View next topic » 
Author Message
nick_alan
PostPosted: Mon Sep 16, 2002 10:14 am    Post subject: Connect to a queue manager on different machine using java Reply with quote

Newbie

Joined: 01 Aug 2002
Posts: 7

Hi,

How can I connect to a queue manager on different machine using java.

qMgr = new MQQueueManager(qManagerName);

will only connect to the queue manager on the same machine. but my java class will be running on a different machine than the queue manager.

I am using WebSphere MQ 5.3
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Mon Sep 16, 2002 8:56 pm    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

You need to set the variables for the MQEnironment class. In particular, you need to set:
Code:
MQEnvironment.channel  = "???";
MQEnvironment.hostname = "???";
MQEnvironment.port     = ???;


later
Roger...
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
boaz
PostPosted: Mon Sep 16, 2002 9:15 pm    Post subject: Another.. Reply with quote

Apprentice

Joined: 28 May 2002
Posts: 43

You can also work with QueueConnectionFactory and QueueConnection and change properties:
Code:
qconFactory = new MQQueueConnectionFactory();
qconFactory.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);
qconFactory.setQueueManager(queueManagerName);
qconFactory.setHostName(hostName);
qconFactory.setChannel(channel);
qcon = qconFactory.createQueueConnection();
Back to top
View user's profile Send private message Send e-mail
RogerLacroix
PostPosted: Mon Sep 16, 2002 9:17 pm    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

Yes, that is for JMS - mine is for MQ base Java.

later
Roger...
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Connect to a queue manager on different machine using java
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.