public interface CICSRequestExit
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:
ECI_ERR_NO_CICS
ECI_ERR_CICS_DIED
ECI_ERR_RESOURCE_SHORTAGE
ESI_ERR_NO_CICS
ESI_ERR_CICS_DIED
ESI_ERR_RESOURCE_SHORTAGE
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.
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.
|
java.lang.String getCICSServer(java.util.Map<RequestDetails,java.lang.Object> requestDetails) throws InvalidRequestException
ECI_ERR_NO_CICS
ECI_ERR_CICS_DIED
ECI_ERR_RESOURCE_SHORTAGE
ESI_ERR_NO_CICS
ESI_ERR_CICS_DIED
ESI_ERR_RESOURCE_SHORTAGE
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.
requestDetails
- A HashMap containing the request data
InvalidRequestException
- if the exit determines that the request
should not be sent to a CICS server.int getRetryCount()
void eventFired(ExitEvent event, java.util.Map<ExitEventData,java.lang.Object> data)
event
- at which the exit is calleddata
- Map of exit event data