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 connect to MQ server machine from WebSphere MQ client

Post new topic  Reply to topic
 How to connect to MQ server machine from WebSphere MQ client « View previous topic :: View next topic » 
Author Message
valdano
PostPosted: Tue Feb 21, 2006 4:36 pm    Post subject: How to connect to MQ server machine from WebSphere MQ client Reply with quote

Newbie

Joined: 12 May 2005
Posts: 5

hi ,

I have a problem connecting to MQ server machine from WebSphere MQ client on machine.

I did
-create a queue manager
-create local queue
-create Server Connection channel related to the queue manager
-Start the queue manager
-verify that the listner is up and running

on the server machine

I did

-install the WebSphere MQ client software on the client machine
-SET MQSERVER=ChannelName/TransportType/ConnectionName

where ConnectionName is Name of the MQ server + port
and ChannelName is Server Connection on the server

and I run this program on the client machine

private static String qManager = "QM1";
private String port = "1414";

MQQueueManager qMgr; // define a queue manager object
Hashtable m_MQenvProp;

m_MQenvProp=new Hashtable(25,0.5f);
int iport = Integer.parseInt(port);
m_MQenvProp.put(MQC.PORT_PROPERTY,new Integer(port));
m_MQenvProp.put(MQC.CCSID_PROPERTY,"720");
//m_MQenvProp.put(MQC.HOST_NAME_PROPERTY,"hostname");
//m_MQenvProp.put(MQC.CHANNEL_PROPERTY,null);

// Create a connection to the queue manager

qMgr = new MQQueueManager(qManager,m_MQenvProp);

but it always give error with reason 2195 in the run time

and i'm just asking what is wrong with the above code
and also how can I write MQ program in a client mode (binding)
so I can connect to a Queue Manager on the MQ server


I will appreciate any reply, please i'm stucked here
Back to top
View user's profile Send private message
wschutz
PostPosted: Tue Feb 21, 2006 4:46 pm    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

First, please don't double post ....
http://www.mqseries.net/phpBB2/viewtopic.php?t=27488&highlight=
Second, the mqhash.java sample does this:
(from http://www-304.ibm.com/jct09002c/isv/tech/sampmq.html )
Code:

java.util.Hashtable env = new java.util.Hashtable();
env.put(MQC.CHANNEL_PROPERTY, "your channel name here");
env.put(MQC.HOST_NAME_PROPERTY, "your hostname here");
env.put(MQC.PORT_PROPERTY, new Integer(1414));
qMgr  = new MQQueueManager("", env);

You need to specify the port, host and channel name, you don't need ccsid.
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
vennela
PostPosted: Tue Feb 21, 2006 4:54 pm    Post subject: Reply with quote

Jedi Knight

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

And in MQv5.3 or earlier, Java programs will not care about the mqserver variable.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
wschutz
PostPosted: Tue Feb 21, 2006 4:58 pm    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

ven, MQ v6 doesn't recognize the MQSERVER vairable either, althought you can use channel tables ....
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
vennela
PostPosted: Tue Feb 21, 2006 5:02 pm    Post subject: Reply with quote

Jedi Knight

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

wschutz wrote:
ven, MQ v6 doesn't recognize the MQSERVER vairable either, althought you can use channel tables ....

Thank you.
That was the thing I wasn't sure about. I knew about the channel tables(though I haven't really tried it except reading about it in the forum here), but didn't know about the MQSERVER.
Thank you.
Back to top
View user's profile Send private message Send e-mail 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 » How to connect to MQ server machine from WebSphere MQ client
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.