apss1943 apss1943 - 4 years ago 397
Java Question

MQJE001: Completion Code '2', Reason '2495

I want to receive some messages from IBM MQ based on java. So I write a very simple code to test what I want. Here is the sample code below.

Const.MQ_QMANAGER = "QM.CREDITWEB3T.PC";
Const.MQ_QUEUE_RECEIVE = "MQ.AIRPORTS";

MQSimpleConnectionManager myConnMan = new MQSimpleConnectionManager();
myConnMan.setActive(MQSimpleConnectionManager.MODE_AUTO);

MQQueueManager qMgr = new MQQueueManager(Const.MQ_QMANAGER,
myConnMan);


When I new the
MQQueueManager
. It’s throw an error message.


The error message is


MQJE001: Completion Code '2', Reason '2495'


May someone help me to figure out what’s wrong here? Thanks a lot.

Answer Source

(1) Your 1st posting is requesting that the connection to the queue manager be in "bindings mode". This means you MUST run the code on the same server where the queue manager is running.

(2) Your 2nd posting is requesting that the connection to the queue manager be in "client mode" (over the network i.e.TCP/IP). This means you can run the code on a remote server and connect to the remote queue manager using the network.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download