Java™ CICS request exit samples

Two sample CICS® request exits are provided. The first sample exit returns the CICS server to use for an ECI or ESI request. The second sample exit supports workload management using a round-robin algorithm.

Location of sample files

The source code for the CICS request exit samples is provided in the following location: <install_path>/samples/java/com/ibm/ctg/samples/ha.

BasicCICSRequestExit

This sample shows you how to implement a basic CICS request exit. The getCICSServer method returns the CICS server to be used on an ECI or ESI request, based on a predefined server mapping. If the CICS server on the ECI or ESI request is defined in the server mapping, the actual CICS server that it maps to is returned. If the CICS server on the ECI or ESI request is not defined in the server mapping, the CICS server is returned unchanged. The sample also demonstrates how to filter requests coming from back-level CICS TG clients. This capability allows to selectively reject the requests that originate from older versions of CICS Transaction Gateway client libraries, such as CICS Transaction Gateway version 7 and CICS Transaction Gateway version 8.

RoundRobinCICSRequestExit

This sample shows you how to implement a CICS request exit to perform workload management. Each time that the getCICSServer method is called, it returns the next CICS server, in a threadsafe manner, from a predefined list. The CICS server specified on the ECI or ESI request by the application is ignored. The retry count is set so that each server in the list is called at most once for each request.