Client/remote and Server/local connection in same process? - Websphere

This is a discussion on Client/remote and Server/local connection in same process? - Websphere ; We have a case where a java program using MQ creates 2 different QueueManager objects. The first is configured to be a remote connection, i.e. given host, port, channel. The second is configured to be a local connection to a ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Client/remote and Server/local connection in same process?

  1. Client/remote and Server/local connection in same process?

    We have a case where a java program using MQ creates 2 different QueueManager objects.
    The first is configured to be a remote connection, i.e. given host, port, channel.
    The second is configured to be a local connection to a local queue manager, so host, port, channel are NOT provided.

    The first new MQQueueManager() is successful for the remote connection.
    When we make the local connection, we get 2058 QMgr Name Error.

    Is there any inherent reason that a java program could not have 2 different types of connections open at the same time?

    We tried a few other scenarios that do work, for example (1) both objects are remote connections (both different and same qmgrs) (2) both objects are local connections (same qmgr).

    Thanks so much for any direction you can provide!

    If this scenario really is a problem, by any chance do you know where it is documented? I've tried googling, etc, but can't seem to get anything but very basic info on client and server connections in general.

    Rebecca

  2. Re: Client/remote and Server/local connection in same process?

    After a brief test it woudl appear that I can create 2 different queue
    manager objects in a simple main program and have a sucessful connection
    both remote and local to the same queue manager. This was on V6 mq.

    Can you re-order the connects in your code? does the local queue manager
    connection work if you make this before the remote connection?

    Rebecca.R.Powell@usa.xerox.com wrote:
    > We have a case where a java program using MQ creates 2 different QueueManager objects.
    > The first is configured to be a remote connection, i.e. given host, port, channel.
    > The second is configured to be a local connection to a local queue manager, so host, port, channel are NOT provided.
    >
    > The first new MQQueueManager() is successful for the remote connection.
    > When we make the local connection, we get 2058 QMgr Name Error.
    >
    > Is there any inherent reason that a java program could not have 2 different types of connections open at the same time?
    >
    > We tried a few other scenarios that do work, for example (1) both objects are remote connections (both different and same qmgrs) (2) both objects are local connections (same qmgr).
    >
    > Thanks so much for any direction you can provide!
    >
    > If this scenario really is a problem, by any chance do you know where it is documented? I've tried googling, etc, but can't seem to get anything but very basic info on client and server connections in general.
    >
    > Rebecca


  3. Re: Client/remote and Server/local connection in same process?

    Thanks for responding Stephen, and for trying that out!

    We did try several more scenarios, including, as you suggested,

    local then remote -- which DID work.

    So, The developer who is actually having this problem thinks that the problem may be that when we create the remote queue manager first, we are setting MQEnvironment properties to do the remote connection. And then may not be explicitly changing them (to empty) before creating the local connection. So the first qmgr remote settings could be interfering when we try to create the local connection. Although the actual creation of the queue managers is in separate classes.

    I'll see if he can try removing the MQEnvironment settings before the second (local) connection. Hopefully it is something this simple.

    If I get an update, I'll post it.

    Thanks again!




+ Reply to Thread