Recovery for Web services

If your Web services use the WebSphere MQ (WMQ) transport and persistent messages, you can use BTS to ensure that messages are recovered in the event of a CICS system failure.

CICS uses Business Transaction Services (BTS) to ensure that persistent messages are recovered in the event of a CICS system failure. For this to work correctly, follow these steps:

  1. Use IDCAMS to define the Local Request Queue (LRQ) and Repository File to MVS. A suitable value for STRINGS must be specified for the file definition.
  2. Use RDO to define the LRQ and Repository File to CICS. A suitable value for STRINGS must be specified for the file definition. The default value of 1 is unlikely to be sufficient, and you are recommended to use 10.
  3. Use RDO to define a PROCESSTYPE with name DFHMQSOA to CICS. Specify the Repository File name as the FILE parameter on this definition. See the BTS manuals for full details of BTS configuration.

For one-way messages, if the Web Service abends or backs out, sufficient information is retained to allow a transaction or program to retry the failing request, or to report the failure appropriately. You must provide this recovery transaction or program. See Persistent message processing.

Persistent message processing

When a Web service request is received in a WMQ persistent message, CICS creates a unique BTS process with the process type DFHMQSOA. Data relating to the inbound request is captured in BTS containers that are associated with the process.

The process is then scheduled to run asynchronously. If the Web Service completes successfully and commits, CICS deletes the BTS process. This includes the case when a SOAP fault is generated and returned to the Web service requester.

Error processing

If an error occurs when creating the required BTS process, the Web service transaction abends and the inbound Web service request is not processing. If BTS is not usable, message DFHPI0117 is issued and CICS continues without BTS, using the existnig channel-based container mechanism.

If a CISC failure occurs before the Web Service starts or completes processing, BTS recovery ensures that the process is rescheduled when CICS is restarted.

If the Web Service abends and backs out, the BTS process is marked complete with an ABENDED status. For request messages that require a response, a SOAP fault is returned to the Web service requester. The BTS process is canceled and CICS retains no information about the failed request. CICS issues message DFHBA0104 on transient data queue CSBA, and message DFHPI0117 on transient data queue CPIO.

For one way messages, there is no way to return information about the failure to the requester so the BTS process is retained in a COMPLETE ABENDED state. CICS issues message DFHBA0104 on transient data queue CSBA and DFHPI0116 on transient data queue CPIO.

The CBAM transaction

You can use the CBAM transaction to display any COMPLETE ABENDED processes, or you can supply a recovery transaction to check for COMPLETE ABENDED processes of the DFHMQSOA and take appropriate action.

For example, your recovery transaction could:

[[ Contents Previous Page | Next Page Index ]]