Web Services Atomic Transactions in CICS

6 Pages

IBM’s CICS Transaction Server V3.1 has extended its existing support for Web-based programming via an integrated environment that supports Web Services. This manages the deployment and use of business components distributed across the Web. Building on top of this architecture, CICS Transaction Server V3.1 also provides support for Web Services Atomic Transactions (WSAT). This implements transaction processing concepts to extended work, distributed across the Web in a Web Service. 

Transaction processing is familiar in the traditional CICS programming model, where a Unit of Work (UOW) runs locally in a particular CICS system, or is distributed across several interconnected systems. The roles of syncpoint coordinator, syncpoint participant(s), and prepare and commit phases—such as Two-Phase Commit (2PC)—are well established in traditional CICS programming. 

This article provides background information on WSAT, defines the terminology, roles and scenarios that pertain to it, and relates the familiar transaction processing concepts of syncpointing and 2PC commit to their equivalent roles in WSAT. 

What Are Web Services Atomic Transactions?  

Support for Web Services in CICS TS V3.1 helps enhance access to CICS from across the Web; it provides for integration of new and current CICS applications in a Service-Oriented Architecture (SOA). This enables CICS applications to be exposed as Web Services, extending their use and value. (For more details, see “CICS Web Services: Background, Hints & Tips,” in the February/March 2006 z/Journal.) 

The exploitation of Web Services may involve CICS as a service requester, service provider, or both. It may involve manipulation of non-recoverable resources or operations (such as data returned by the browsing of VSAM records); alternatively, it may result in complicated changes to several recoverable resources as part of the underlying UOWs executed by associated CICS applications. This means transaction processing concepts have to be applied to ensure such distributed processing is handled correctly. 

One formalized description of a transaction is “an inseparable list of recoverable operations that must be executed either in its entirety or not atall.” In CICS, the term transaction represents a particular application, consisting of one or more programs written to perform a specific function. 

A CICS transaction is different from the formal definition of a transaction; in the CICS environment, transactional properties such as atomicity are UOW properties. A CICS transaction may be comprised of more than one atomic set of changes (multiple UOWs). Delineation of recoverable activity into different UOWs is achieved by programs issuing syncpoint commands to CICS. A syncpoint instructs CICS to commit the recoverable changes made so far by the current UOW, terminate that UOW, and begin a new one. 

UOWs can exist in a single CICS system, or they can be distributed across multiple interconnected systems. Even in a pure CICS-to-CICS programming environment, with no Web involvement, there’s a complicated recoverable infrastructure necessary to support distributed UOWs across multiple CICS systems. Changes made to recoverable resources in each system need to be coordinated so the distributed UOW can either commit all the changes successfully or back them all out. This atomicity of recoverable changes is one of the tenets of the ACID programming model, which in CICS terminology can be stated as: 

  • Atomicity: A UOW’s entire sequence of recoverable actions must be either completed or aborted; it cannot be partially successful.
  • Consistency: A UOW takes recoverable resources from one consistent state to another.
  • Isolation: Although multiple UOWs may execute concurrently, each must be unaware of other concurrently executing ones. A UOW’s effect must not be visible until it’s committed.
  • Durability: After a UOW completes successfully, committed changes will persist and must be capable of surviving a system failure. 

CICS TS V3.1 Recovery Management services extend these ACID concepts to provide a means of coordinating such distributed work in the scope of a Web Service. Web Services can be configured to participate in an extended or global UOW, known as an Atomic Transaction. If they do, any recoverable updates they make aren’t committed or backed out until the Web Service is instructed to do so. Also, updates can be completed manually or automatically if they can’t be successfully coordinated in a reasonable timeframe. 

6 Pages