CICS® Transaction Gateway Programming Reference v1.1.0.0

com.ibm.ctg.ha
Interface CICSRequestExit


public interface CICSRequestExit

All implementations of CICS Transaction Gateway CICS request exit classes must implement the CICSRequestExit interface. CICS request exits are supported on CICS Transaction Gateway for z/OS but not on CICS Transaction Gateway for Multiplatforms.

A CICS request exit provides the CICS Transaction Gateway administrator with the ability to choose the CICS server that a request will be sent to. The choice of which CICS server to use is available at the start of every extended LUW or XA transaction and for every SYNCONRETURN ECI request. If the request fails with a retryable error, the exit will be called repeatedly to allow a different CICS server to be selected. The retryable errors are:

When a CICS server is to be chosen the getCICSServer method is called passing in information about the request which can be used to determine which server to use. This method should then return the name of the CICS server that the request will be sent to.

The exit can implement a no arguments constructor to initialize any data that is required by the exit. As part of Gateway daemon shutdown, the eventFired method is called with an event type of ShutDown, providing an opportunity for the exit to release any resources it has acquired as part of its processing.

The getRetryCount method will be called once the exit has been loaded to determine how many times a request is to be retried when a retryable error occurs. This method will only be called once, meaning it is not possible to change the retry count once the Gateway daemon has been started.


Method Summary
 void eventFired(ExitEvent event, java.util.Map<ExitEventData,java.lang.Object> data)
          This method will be called for each defined ExitEvent.
 java.lang.String getCICSServer(java.util.Map<RequestDetails,java.lang.Object> requestDetails)
          This method will be called at the start of every extended LUW or XA transaction and for every SYNCONRETURN ECI request that is received by the CICS Transaction Gateway.
 int getRetryCount()
          This method will be called after the exit is loaded to determine the maximum number of times a request will be retried when it fails with one of the following errors: ECI_ERR_NO_CICS ECI_ERR_CICS_DIED ECI_ERR_RESOURCE_SHORTAGE
 

Method Detail

getCICSServer

java.lang.String getCICSServer(java.util.Map<RequestDetails,java.lang.Object> requestDetails)
                               throws InvalidRequestException
This method will be called at the start of every extended LUW or XA transaction and for every SYNCONRETURN ECI request that is received by the CICS Transaction Gateway. If the request fails with a retryable error, the exit will be called repeatedly to allow a different CICS server to be selected. The retryable errors are:

If the CICS server specified on the request is null or an empty string, the server is not mapped to the default server before getCICSServer is called. The default server will only be used if getCICSServer returns it explicitly or if the method returns null or an empty string.

Parameters:
requestDetails - A HashMap containing the request data
Returns:
The name of the CICS server that the work should be sent to. If the CICS server is not being changed by the request then the Server entry in the requestDetails HashMap should be returned. If the method returns null or an empty string the default server is used.
Throws:
InvalidRequestException - if the exit determines that the request should not be sent to a CICS server.

getRetryCount

int getRetryCount()
This method will be called after the exit is loaded to determine the maximum number of times a request will be retried when it fails with one of the following errors:

Returns:
The number of times a request is to be retried

eventFired

void eventFired(ExitEvent event,
                java.util.Map<ExitEventData,java.lang.Object> data)
This method will be called for each defined ExitEvent. The CICS request exit can selectively process these using the event parameter.

Parameters:
event - at which the exit is called
data - Map of exit event data

©Copyright IBM Corp. 1994, 2014
Legal