[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to connect to Websphere MQ from client pc?

Posted on 2007-10-02
1
Medium Priority
?
2,153 Views
Last Modified: 2013-12-11
Hi,

I installed Webphere MQ ver6 on my windows 2003 server. On the same lan as my server, I have a desktop pc which I want to develop a JMS client application to to send/receive file to and from the Websphere MQ.

The part that I want to ask is: from my JMS 1.1 client application, how do I connect the MQ server so that I can start to send/receive message? can you give me a sample connection code?

Thanks,
0
Comment
Question by:mapringteam
1 Comment
 
LVL 3

Accepted Solution

by:
willyRD earned 375 total points
ID: 20139693
You can find an interesting example by IBM at: http://www-304.ibm.com/jct09002c/isv/tech/sample_code/mq/mqhash.java

The connection parameters (channel, hostname and port) are set in a Hashtable:

         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));

and then you create your MQQueueManager (if a manager name has been set then use it, otherwise the manger name is ""):

         qMgr  = new MQQueueManager("your manager name", env);

after these configuration parameters you can start sending and receiving messages.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Verbose logging is used to diagnose garbage collector problems. By default, -verbose:gc output is written to either native_stderr.log or native_stdout.log.   It is also possible to redirect the logs to a user-specified file. This article will de…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question