Posted: Sun Sep 08, 2002 10:17 pm Post subject: How to read SYSTEM.ADMIN.XXX.EVENT
Acolyte
Joined: 17 Oct 2001 Posts: 50
I am trying to read the SYSTEM.ADMIN.CHANNEL.EVENT QUEUE in Java.
I am not able to open it as it says it is in use. Can't I check for the events.
My options are
qMgr = new MQQueueManager(qManager);
int openOptions = MQC.MQOO_INPUT_SHARED | MQC.MQOO_BROWSE ;
Just got an additional info about the PCF commands. But I am unable to get a sample source code that can read EVENT queu using PCF command. Do we need PCF command to read the EVENT QUEUE ? as I do find MQCMD_PERFM_EVENT in CMQCFC Java class
Joined: 22 May 2002 Posts: 268 Location: NIMCONSULT - Belgium
Most probable cause is that another process has opened the queue in exclusive mode (which is by the way the default open option on event queues if I remeber well). You may have a monitoring agent already running on your queue manager.
My error was MQJE001 : Completion code 2 and reason code 2042. I am not using any other event monitoring tool. But not I have a improvement , this error comes only some times. Other wise my program works fine. Have any idea if any other process might use event queues in exec mode ? Below is my code
import java.io.*;
import com.ibm.mq.*;
import com.ibm.mq.pcf.*;
import java.util.*;
import java.text.*;
public class ChannelMonitorNew {
/**
* For testing only.
*/
public static void main(String[] args) {
Joined: 22 May 2002 Posts: 268 Location: NIMCONSULT - Belgium
Yes I have an idea: your application is blocking itself!
Try to reproduce this:
- make sure your event queue until you see an open input count 0.
- run your application.
- when the application ends look immediately at the open input count. Chance are great that open input count remains 1 for some seconds.
- if you restart your application immediately you fail to open the queue because the handle of the previous execution was not cleaned.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum