com.ibm.ctg.ha

Interface CICSRequestExit



  • public interface CICSRequestExit
    All implementations of CICS Transaction Gateway CICS request exit classes must implement the CICSRequestExit interface.

    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, for every SYNCONRETURN ECI request and every ESI 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 is 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 is only called once, meaning it is not possible to change the retry count once the Gateway daemon has been started.

    Exits should not invoke the System.exit() method or any other methods that alter the state of the running Java virtual machine.

    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void eventFired(ExitEvent event, java.util.Map<ExitEventData,java.lang.Object> data)
      This method is called for each defined ExitEvent.
      java.lang.String getCICSServer(java.util.Map<RequestDetails,java.lang.Object> requestDetails)
      This method is called at the start of every extended LUW or XA transaction , for every SYNCONRETURN ECI request and every ESI request that is received by the CICS Transaction Gateway.
      int getRetryCount()
      This method is called after the exit is loaded to determine the maximum number of times a request is retried.
    • Method Detail

      • getCICSServer

        java.lang.String getCICSServer(java.util.Map<RequestDetails,java.lang.Object> requestDetails)
                                       throws InvalidRequestException
        This method is called at the start of every extended LUW or XA transaction , for every SYNCONRETURN ECI request and every ESI request that is received by the CICS Transaction Gateway. If the request fails with a retryable error, the exit is 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 is only 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.
      • eventFired

        void eventFired(ExitEvent event,
                      java.util.Map<ExitEventData,java.lang.Object> data)
        This method is 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, 2013
Legal