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:
- 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.
- 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
- 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
- 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.