WS transaction

from Wikipedia, the free encyclopedia

WS-Transaction is a standard from the context of the so-called WS- * specifications. WS-Transaction aims to provide the principle of transactions , which is mainly known from databases, also for web services. For this purpose, the standard consists of three sub-specifications.

Sub-specifications

WS coordination

WS-Coordination describes an extensible framework that provides protocols that enable actions of distributed applications to be coordinated with one another. In addition to the requirements for services that WS-Transaction should use, it also includes a precise structure that enables transactions to be implemented across the boundaries of heterogeneous systems. The specification stipulates that there must always be a coordinator with whom the respective web services register.

WS-Coordination can also be used independently of WS-Transaction, as the standard is designed so flexibly that it can cover any type of application in the context of distributed applications.

WS-AtomicTransaction

WS-AtomicTransaction is based on WS-Coordination in that it only specifies the concrete protocols. WS-AtomicTransaction is aimed specifically at short-term transactions for which the so-called ACID properties are important. Specifically, it contains the following protocols:

  • Completion
  • Volatile two-phase commit
  • Durable two-phase commit

A WS method can be configured as follows with regard to the transaction properties to be supported:

  • Required  : If the client is already in a valid transaction context, the method is executed within this transaction context. Otherwise a new transaction is started
  • RequiresNew  : If the client is already in a valid transaction context, the transaction is suspended and the method is executed within a new transaction. After the method has ended, the new transaction is also ended and the previous transaction is resumed. Otherwise a new transaction is started.
  • Mandatory  : The client must be in a valid transaction context.
  • NotSupported  : If the client is within a transaction, this is suspended and resumed again after the method has ended.
  • Supports  : If the client is within a transaction, this is used, otherwise the method is not executed in a transaction.
  • Never  : The method must not be called within a transaction.

WS-BusinessActivity

In contrast to WS-AtomicTransaction, WS-BusinessActivity is aimed at longer-running business transactions, but also only contains the specific protocols for WS-Coordination . Specifically, it contains the following two protocols:

  • BusinessAgreementWithParticipantCompletion
  • BusinessAgreementWithCoordinatorCompletion

It is important here that the resources cannot be “locked” because the “transactions” run longer. For this reason, there are so-called compensation activities in the event of an error, which are intended to undo changes that have already been made.

history

The specifications were developed by IBM , BEA Systems , Microsoft , Arjuna , Hitachi and IONA and presented on November 1, 2004. After an update on August 16, 2005, version 1.1 of the standard was also recognized as the official OASIS standard.

Web links