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:
- Add ctgsamples.jar to the class path used when starting CICS® Transaction Gateway.
- Set the requestexits value in the configuration
file to
com.ibm.ctg.samples.requestexit.ThreadedMonitor
. - 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
- 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
- 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:
(time is in milliseconds).CTGSTART_OPTS=-j-Dcom.ibm.ctg.samples.requestexit.lrt=5000
The sample program code details additional optional parameters that can be set.