Note that there are some explanatory texts on larger screens.

plurals
  1. PONeed to Access the Queue depth of MQ 7
    primarykey
    data
    text
    <p>My Below is the code works good with MQ6 but for MQ7 its giving exception</p> <pre><code>'package javaapplication1; import java.io.*; import java.net.*; import java.util.*; import java.util.TimerTask; import com.ibm.mq.MQEnvironment; import com.ibm.mq.MQException; import com.ibm.mq.MQQueue; import com.ibm.mq.MQQueueManager; import com.ibm.mq.constants.CMQC; class Connectivity { public static void main(String args[]) throws MQException { String qManager=""; int port_num=0; int openOptions = CMQC.MQOO_FAIL_IF_QUIESCING + CMQC.MQOO_INPUT_SHARED; MQEnvironment.hostname = "Host_name"; MQEnvironment.port = port_num; MQEnvironment.channel = "Chn_name"; System.out.println("Connecting to queue manager: " + qManager); Hashtable props = new Hashtable(); // Change the host name to your host name. Leave it as it is if // queue manager is on the same machine props.put(CMQC.HOST_NAME_PROPERTY, "Host_name"); props.put(CMQC.PORT_PROPERTY, port_num); props.put(CMQC.CHANNEL_PROPERTY, "Chn_Name"); MQQueueManager qMgr = new MQQueueManager(qManager, props); //MQQueueManager qMgr = new MQQueueManager("SW1_QM"); MQQueue destQueue = qMgr.accessQueue("Q_Name", openOptions); System.out.println("E_RETRY size:" + destQueue.getCurrentDepth()); destQueue.close(); qMgr.disconnect(); } }' </code></pre> <p>I get exception on the line </p> <p>'System.out.println("E_RETRY size:" + destQueue.getCurrentDepth());'</p> <p>and the exception message is </p> <pre><code>'MQJE001: Completion Code 1, Reason 2068 Exception in thread "main" com.ibm.mq.MQException: MQJE001: Completion Code 1, Reason 2068 at com.ibm.mq.MQManagedObject.inquire(MQManagedObject.java:257) at com.ibm.mq.MQManagedObject.getInt(MQManagedObject.java:428) at com.ibm.mq.MQQueue.getCurrentDepth(MQQueue.java:1478) at javaapplication1.Connectivity.main(Connectivity.java:36) Java Result: 1' </code></pre> <p>Kindly help me..</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload