title: Websphere 7 MQueue: how to access queue depth from Java?
body: <p>I'd like to write some code to monitor the queue size on Websphere 7 MQ.
  This is the code I've come up with</p>
  
  <pre><code>   MQEnvironment.hostname = "10.21.1.19"; 
     MQEnvironment.port = 1414;
     MQEnvironment.channel = "SYSTEM.CDEF.SVRCONN";
     MQEnvironment.properties.put(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES);
  
     MQQueueManager qMgr = new MQQueueManager("MYQMGR");
  
     MQQueue destQueue = qMgr.accessQueue("PUBLISH", MQC.MQOO_INQUIRE);
     System.out.println(destQueue.getCurrentDepth());
     destQueue.close();
     qMgr.disconnect();
  </code></pre>
  
  <p>How do I know what the "Channel" is?</p>
  
  <p>How do I know what the queue manager name is that I pass into MQQueueManager?</p>
  
  <p>Or is there another API that I should look at?</p>
  
  <p>I need it work with WRS 7 SIB and MQ.</p>
  
  <p>Thanks
  Jeff Porter</p>