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.

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. Data is written to STDOUT by default. To capture data to a file use the Java property com.ibm.ctg.samples.requestexit.out, for example:
    CTGSTART_OPTS=-j-Dcom.ibm.ctg.samples.requestexit.out=/hfs.file 
  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_OPTS=-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_OPTS=-j-Dcom.ibm.ctg.samples.requestexit.lrt=5000
    
    (time is in milliseconds).

The sample program code details additional optional parameters that can be set.