How to connect to Websphere MQ from client pc?

Posted on 2007-10-02
Last Modified: 2013-12-11

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?

Question by:mapringteam
    1 Comment
    LVL 3

    Accepted Solution

    You can find an interesting example by IBM at:

    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Suggested Solutions

    Title # Comments Views Activity
    installing and using WTP plugin eclipse MARS 3 65
    Need some clarity on Rest API 5 51
    nested interface 5 29
    noX challenge 17 54
    Configure Web Service (server application) I. Configure security for Web Services methods First, we need to protect Session bean which implements the service: 1. Open EJB deployment descriptor (ejb-jar.xml) in the EJB project that contains you…
    This article is about some of the basic and important steps to be used to improve the performance in web-sphere commerce application development. 1) Always leverage the Dyna-caching facility provided by the product 2) Remove the unwanted code …
    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.

    737 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

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now