Java ThreadedMonitor request monitoring exit sample

This sample extends the BasicMonitor sample program. The sample uses a background thread to reduce the overhead for each monitored request. The sample program writes the data available at each exit point to STDOUT or to a file specified by the Java™ property com.ibm.ctg.samples.requestexit.out. Errors are logged to STDERR or to a file specified by the Java property com.ibm.ctg.samples.requestexit.err.

The class name of this sample is com.ibm.ctg.samples.requestexit.ThreadedMonitor.java.

To enable the sample program on the Gateway daemon you must do the following:
  1. Add ctgsamples.jar to the class path used when starting CICS® Transaction Gateway.
  2. Set the requestexits value in the configuration file to com.ibm.ctg.samples.requestexit.ThreadedMonitor.
  3. On UNIX and Linux, errors are logged to STDERR by default. On Windows, errors are logged to file threadedMonitorError.txt in the CICS TG data directory by default. You can override the default error destination by setting the Java property com.ibm.ctg.samples.requestexit.err to specify the name of the file to write errors to
  4. Errors are written to STDERR by default. To capture data to a file use the Java property com.ibm.ctg.samples.requestexit.err, for example:
    ctgstart -j-Dcom.ibm.ctg.samples.requestexit.err=/hfs.error.file
  5. An alert is logged for any transactions that take longer than 15 seconds. To change this time, use the Java property com.ibm.ctg.samples.requestexit.lrt, for example:
    ctgstart -j-Dcom.ibm.ctg.samples.requestexit.lrt=5000
    (time is in milliseconds).
The sample program code details additional optional parameters that can be set.

Information Information

Feedback


Timestamp icon Last updated: Tuesday, 19 November 2013


https://ut-ilnx-r4.hursley.ibm.com/tg_latest/help/topic/com.ibm.cics.tg.doc//progde/ThreadedMonitor.html