Browse Prior Art Database

Dynamic provision of XA recovery information

IP.com Disclosure Number: IPCOM000031019D
Original Publication Date: 2004-Sep-07
Included in the Prior Art Database: 2004-Sep-07
Document File: 2 page(s) / 42K

Publishing Venue

IBM

Abstract

The Java* Transaction API (JTA) specification describes a set of interfaces between a transaction manager, resource manager and application server to support distributed transactions based on the X/Open XA protocol. The resource manager is represented by an implementation of the XAResource interface both during normal processing and, after a server failure, during transaction recovery. The specification does not, however, define how an instance of the resource manager's XAResource is obtained at recovery time. This article describes an approach that enables a resource manager to defer and/or dynamically modify the XA recovery information that it provides while still utilizing the transaction manger's log.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 51% of the total text.

Page 1 of 2

Dynamic provision of XA recovery information

Disclosed is a mechanism that enables a resource manager to defer the provision of, and/or dynamically modify, the information that is logged by a transaction manager for use during transaction recovery.

    The Java* Transaction API (JTA) specification describes a set of interfaces between a transaction manager, resource manager and application server to support distributed transactions based on the X/Open XA protocol. The resource manager is represented by an implementation of the XAResource interface both during normal processing and, after a server failure, during transaction recovery. The specification does not, however, define how an instance of the resource manager's XAResource is obtained at recovery time.

    One possible solution, that chosen by the Java 2 Connector Architecture (JCA) specification, is for the application server to use the same mechanism to obtain the XAResource at recovery time that it did during normal processing. For example, in the outbound JCA case, the XAResource is obtained during normal processing from a ManagedConnection which has, in turn, been created from a ManagedConnectionFactory, the class name and properties of which are known to the application server. The application server retains this information so that, during transaction recovery, it may use the same mechanism of creating a ManagedConnectionFactory, setting the properties, creating a managed connection and obtaining an XAResource, that is used initially.

    The drawback with this solution is that the resource manager may have made some non-deterministic decision when the original XAResource was created, the result of which needs to be known during recovery time. Due to this non-determinism the information supplied by the application server may not be sufficient to correlate the recovery request with the original. As an example, a JCA resource adapter might, at runtime, select one backend from a set and, after a failure, would need to know which backend to return to in order to perform recovery.

    This article describes a dynamic approach to the provision of XA recovery information by a resource manager. The application server queries the resource manager for recovery information prior to every transactional enlistment. The transaction manager may then log each distinct set of recovery information and, on recovery, the resource manager may translate the information back into XAResource instances. The advantage of this approach over the static mechanism described above is that the resource manager may change the information that it wishes to be logged from one transaction to the next. By permitting the resource adapter to store this information in the transaction manager's log it also means that the resource manager does not require persistent storage of its own on the application server to keep this information. In the example above, this mechanism would not only allow the resource adapter to select a...