19.6. WebSphere MQ JAVA tracing

WebSphere MQ JMS applications normally invoke trace by using command line arguments to the JAVA command. For example:

java -DMQJMS_TRACE_LEVEL=base  myJMSApplication

Sometimes this is not possible, for example when the JMS application is started as a servlet within an application server. In this case it may be appropriate to invoke trace from within the source code.

This can be done as follows:

  • com.ibm.mq.jms.services.ConfigEnvironment.start();

    This uses MQJMS TRACE_LEVEL and _DIR from the system properties.

  • com.ibm.mq.jms.services.ConfigEnvironment.start(String level);

    This uses MQJMS_TRACE_DIR; the level parameter should “on,” or “base.”

  • com.ibm.mq.jms.services.ConfigEnvironment.stop();

The value of MQJMS_TRACE_DIR ...

Get z/OS Diagnostic Data Collection and Analysis now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.