ISO IEC 14834-1996 Information technology - Distributed transaction processing - The XA specification《信息技术 分布式事务处理 XA规范》.pdf

上传人:livefirmly316 文档编号:1256857 上传时间:2019-09-02 格式:PDF 页数:125 大小:7.98MB
下载 相关 举报
ISO IEC 14834-1996 Information technology - Distributed transaction processing - The XA specification《信息技术 分布式事务处理 XA规范》.pdf_第1页
第1页 / 共125页
ISO IEC 14834-1996 Information technology - Distributed transaction processing - The XA specification《信息技术 分布式事务处理 XA规范》.pdf_第2页
第2页 / 共125页
ISO IEC 14834-1996 Information technology - Distributed transaction processing - The XA specification《信息技术 分布式事务处理 XA规范》.pdf_第3页
第3页 / 共125页
ISO IEC 14834-1996 Information technology - Distributed transaction processing - The XA specification《信息技术 分布式事务处理 XA规范》.pdf_第4页
第4页 / 共125页
ISO IEC 14834-1996 Information technology - Distributed transaction processing - The XA specification《信息技术 分布式事务处理 XA规范》.pdf_第5页
第5页 / 共125页
点击查看更多>>
资源描述

1、INTERNATIONAL STANDARD ISO/IEC 14834 First edition 1996-08-I 5 Information technology - Distributed Transaction Processing - The XA Specification Technologies de Iinformation - Traitement transactionnel - La spkification XA Reference number ISO/IEC 14834:1996(E) ISO/IEC 14834:1996(E) Contents Chapte

2、r 1 1.1 1.2 1.3 1.4 General . Scope X/Open DTP Model Document Structure . Normative References . _ . Chapter 2 2.1 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 2.3 2.3.1 2.3.2 2.3.3 2.3.4 Model and Definitions X/Open DTP Model Definitions Transaction . Distributed Transaction Processing

3、 . Application Program Resource Manager . Global Transactions Transaction Branches . Transaction Manager Thread of Control Tightly- and Loosely-coupled Threads . Transaction Completion and Recovery . Rolling Back the Global Transaction Protocol Optimisations Heuristic Branch Completion . Failures an

4、d Recovery 3 4 5 5 5 5 5 6 6 6 7 7 8 8 8 9 9 Chapter 3 3.1 3.2 3.3 3.3.1 3.4 3.5 3.6 Interface Overview Index to Services in the XA Interface . Opening and Closing Resource Managers . Association of Threads with Transaction Branches . Registration of Resource Managers Branch Completion Synchronous,

5、Non-blocking, and Asynchronous Modes . Failure Recovery 11 12 13 14 15 16 17 17 Chapter 4 The “xa.h”Header 19 4.1 Naming Conventions 19 4.2 Transaction Identification 19 4.3 Resource Manager Switch . 21 4.4 Flag Definitions 22 0 ISO/IEC 1996 All rights reserved. Unless otherwrse specified, no part o

6、f this publication may be repro- duced or utilized in any form or by any means, electronic or mechanical, including photo- copying and microfilm, wrthout permission in writing from the publisher. ISO/IEC Copyright Office l Case postale 56 l CH-1211 Geneve 20 l Swrtzerland Printed in Swrtzerland OISO

7、/IEC ISOAEC 14834:1996(E) 4.5 Chapter 5 Chapter 6 6.1 6.2 6.2.1 6.3 6.4 Chapter 7 7.1 7.2 7.2.1 7.3 Appendix A Appendix B B.l B.2 8.3 8.4 Appendix C c.1 c.2 Appendix D DTP Model - The Model 81 D.l Functional Model 82 D.2 Functional Components . 83 D.2.1 Application Program (AP) 83 D.2.2 Transaction

8、Manager (TM) 83 D.2.3 Resource Manager (RM). 83 D.2.4 Communication Resource Manager (CRM) . 84 Return Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Reference Manual Pages 27 ax-reg( )

9、 . 28 ax-unreg( ) . 31 xa-c/ose( ) 32 xacommit( ) . 34 xa-complete ( ) 37 xa-end( ) 38 xa-forget( ) . 41 xa-open( ) 43 xa-prepare( ) 45 xa-recover( ) . 48 xa-ro/back( ) 50 xa-start( ) . 53 State Tables Resource Manager lnitialisation . Association of Threads of Control with Transactions . Dynamic Re

10、gistration of Threads Transaction States . Asynchronous Operations Implementation Requirements . Application Program Requirements Resource Manager Requirements The Application Program (Native) interface . Transaction Manager Requirements . Complete Text of “xa.h” . . . . . . . . . . . . . . . . . .

11、. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . DTP Model - Introduction . Overview . Benefits of X/Open DTP . Areas Not Addressed . Relationship to International Standards DTP Model - Definitions . Transaction Definitions . Model Definitions . 24 57 58 59 59 61 63 65 6

12、5 66 68 69 71 75 75 76 76 76 77 77 79 . . . III ISO/IEC 14834: 1996(E) OISO/IEC D.3 D.3.1 D.3.2 D.4 D.4.1 D.4.2 D.4.3 D.4.4 D.4.5 D.4.6 D.5 D.5.1 D.5.2 D.5.3 D.5.4 D.5.5 D.5.6 D.5.7 D.5.8 D.6 D.6.1 D.6.2 D.6.3 D.6.4 D.6.5 D.6.6 D.7 D.7.1 D.7.2 D.7.3 0.7.4 D.8 Appendix E DTP Model - Frequently Asked

13、Questions . . . . . . . . . . . . . . . . . . . 99 Appendix F Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 Interfaces between Functional Components . Functional Component I

14、nterfaces Data Interfaces . Activity Involving a Single AP . Transaction Initiation . Transaction Association Transaction Commitment Transaction Rollback . Heuristic Transaction Completion Recovery after Failure . Distributed Communication Facilities Communication within TM Domains Communication acr

15、oss TM Domains . Sharing Resources across TM Domains . Global Transaction Demarcation . Global Transaction Tree Structure . Global Transactions and the Transaction Tree . Tightly- and Loosely-coupled Threads . Commitment Coordination . Activity Involving Two or More APs . Transaction Initiation . Tr

16、ansaction Association Transaction Commitment Transaction Rollback . Heuristic Transaction Completion Recovery after Failure . CRM Communication Paradigms with APs . The TxRPC Interface The XATMI Interface . The CPI-C Version 2 Interface Relationships between the Communication Paradigms High-level TP

17、 Language . 85 85 87 88 88 88 88 89 89 90 91 91 91 91 91 91 92 93 93 94 94 94 94 95 95 95 96 96 96 97 97 98 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

18、5 List of Figures 2-l 3-l C-l D-l D-2 E-l Functional Components and Interfaces . 4 The XA Interface . 11 A TM Domain with Four Instances . 79 Functional Components and Interfaces . 82 Global Transaction Tree Structure . 92 Projection of Model onto Processes 101 OISO/IEC lSO/lEC 14834:1996(E) List of

19、 Tables 4-l 6-l 6-2 6-3 6-4 6-5 Flags used in Particular Function Calls . 23 State Table for Resource Manager lnitialisation 58 State Table for Transaction Branch Association 59 State Table for Transaction Branch Association (Dynamic Registration) 60 State Table for Transaction Branches . 62 State T

20、able for Asynchronous Operations . 63 V ISO/IEC 14834:1996(E) o lSO/IEC Foreword IS0 (the International Organization for Standardization) and IEC (the Inter- national Electrotechnical Commission) form the specialized system for worldwide standardization. National bodies that are members of IS0 or IE

21、C participate in the development of International Standards through technical committees established by the respective organization to deal with particular fields of technical activity. IS0 and IEC technical com- mittees collaborate in fields of mutual interest. Other international organiz- ations,

22、governmental and non-governmental, in liaison with IS0 and IEC, also take part in the work. In the field of information technology, IS0 and IEC have established a joint technical committee, ISO/IEC JTC 1. Draft International Standards adopted by the joint technical committee are circulated to nation

23、al bodies for vot- ing. Publication as an International Standard requires approval by at least 75 % of the national bodies casting a vote. International Standard ISO/IEC 14834 was prepared by X/Open Company Ltd. (as XO/CAE/91/300) and was adopted, under a special “fast-track pro- cedure”, by Joint T

24、echnical Committee ISO/IEC JTC 1, information tech- nology, in parallel with its approval by national bodies of IS0 and IEC. Appendix A forms an integral part of this International Standard. Appen- dices B to F are for information only. o ISOAEC ISO/IEC 14834:1996(E) Introduction (This introduction

25、is not a normative pan of ISO/IEC 14834, Information technology-Distributed Transaction Processing-The XA Specification, but is included for information only.) This International Standard specifies the bidirectional interface between a transaction manager and resource manager (the XA interface) in a

26、n X/Open Distributed Transaction Processing (DTP) environment. It is based on X/Open CAE Specification, Distributed Transaction Processing: The XA Specification (December 1991). This International Standard is technically identical to the X/Open version. For informative purposes, this International S

27、tandard also contains the text of the X/Open DTP Reference Model Version 3 which X/Open has published as a separate Guide. Typographical Conventions The following typographical conventions are used throughout this document: l Constant width strings are code examples or literals and are to be typed j

28、ust as they appear. l /talk strings are used for emphasis or to identify the first instance of a word requiring definition. Italics also denote: - variable names - commands or utilities - functions; these are shown as follows: name( ). l The notation “fi1e.h” indicates a header. l The notation ABCD

29、is the name of a return value. . Ellipses (. . .) are used to show that additional arguments are optional. Trademarks X/Open is a registered trade mark, and the “X” device is a trade mark, of X/Open Company Limited. vii INTERNATIONAL STANDARD 0 ISO/IEC ISO/IEC 14834: 1996(E) Information technology -

30、 Distributed Transaction Processing - The XA Specification Chapter I: General 1.1 Scope This International Standard specifies the XA interface: the bidirectional interface between a transaction manager and a resource manager in an X/Open Distributed Transaction Processing (DTP) environment. The XA i

31、nterface is not an ordinary Application Programming Interface (API); it is a system-level interface between DTP software components. This International Standard is technically identical to X/Open CAE Specification, Distributed Transaction Processing: The XA Specification (December 1991). Like that s

32、pecification, this International Standard does not define the full aspects of the DTP model that pertain to communication. 1.2 X/Open DTP Model The X/Open Distributed Transaction Processing (DTP) model is a software architecture that allows multiple application programs to share resources provided b

33、y multiple resource managers, and allows their work to be coordinated into global transactions. The full X/Open DTP model comprises five basic functional components: l an Application Program (AP), which defines transaction boundaries and specifies actions that constitute a transaction l Resource Man

34、agers (RMs) such as databases or file access systems, which provide access to resources l a Transaction Manager (TM), which assigns identifiers to transactions, monitors their progress, and takes responsibility for transaction completion and for coordinating failure recovery. ISO/IEC 14834:1996(E) O

35、ISOAEC 1.3 . Communication Resource Managers (CRMs), which control communication between distributed applications within or across TM domains. . a communication protocol, which provides the underlying communication services used by distributed applications and supported by CRMs. Document Structure R

36、elevant definitions and other important concepts that pertain to this International Standard are discussed in Chapter 2. That chapter also defines the AP, TM, and RM in more detail, and describes their interaction. Chapter 3 is an overview of the XA interface, describing the situations in which each

37、 of the services is used. Chapter 4 discusses the data structures that are part of the XA interface. Reference manual pages for each routine in the XA interface are presented in Chapter 5; state tables follow in Chapter 6. Chapter 7 summarises the implications of this International Standard on the i

38、mplementors of RMs and TMs; it also identifies features that are optional. Appendix A presents the contents of an “xa.h” header file in both ANSI C and Common Usage C. Appendix F contains a bibliography. For informative purposes, this International Standard also contains the text of the X/Open DTP R

39、eference Model Version 2 (November 1993) which X/Open publishes as a separate Guide. (See Appendix B, Appendix C, Appendix D, and Appendix E.) 1.4 Normative References The following standards contain provisions which, through reference in this text, constitute provisions of this International Standa

40、rd. At the time of publication, the editions indicated were valid. All standards are subject to revision, and parties to agreements based on this International Standard are encouraged to investigate the possibility of applying the most recent editions of the standards indicated below. Members of IEC

41、 and IS0 maintain registers of currently valid International Standards. 1. ISO/IEC 8824:1990, lnforma tion technology-Open Systems Interconnection- Specification of Abstract Syntax Notation One (ASN. I). 2. lSO/IEC 8825:1990, lnforma tion technology-Open Sys terns Interconnection- Specification of B

42、asic Encoding Rules for Abstract Syntax Notation One (ASN. 1). 3. ISO/IEC 9804:1994, Information technology-Open Systems Interconnection-Sewice definition for the commitment, concurrency and recovery service element. 4. ISO/IEC 9805-l : 1994, Information technology-Open Systems Interconnection-Proto

43、col for the Commitment, Concurrency and Recovery service element: Protocol Specification. 5. ISO/IEC 9899:1990, Programming languages-c. 6. ISO/IEC 10026-l :1992, information technology-Open Systems Interconnection- Distributed Transaction Processing-Part 1: OSI TP Model. 7. ISO/IEC 10026-2:1996, in

44、formation technology-Open Systems Interconnection- Distributed Transaction Processing-Part 2: OSI TP Service. 8. ISO/IEC 10026-3: 1996, information technology-Open Systems Interconnection- Distributed Transaction Processing-Part 3: Protocol Specification. See Appendix F for bibliographic references.

45、 OISOhEC Chapter 2: Model and Definitions lSO/lEC 14834:1996(E) This chapter discusses the XA interface in general terms and provides necessary background material for the rest of this International Standard. The chapter shows the relationship of the interface to the X/Open DTP model. The chapter al

46、so states the design assumptions that the interface uses and shows how the interface addresses common DTP concepts. 3 ISOAEC 14834:1996(E) OISOAEC 2.1 X/Open DTP Model The boxes in Figure 2-l are the functional components and the connecting lines are the interfaces between them. The arrows indicate

47、the directions in which control may flow. SUPERIOR NODE Application Program (AI) / II/ I (1) (2) (5) (6) OS1 TP T I I I I I I I I I Ii I I I I I I 1 I I SUBORDINATE NODE Figure 2-1 Functional Components and Interfaces The numbers in brackets in Figure 2-l represent the different X/Open interfaces th

48、at are used in the DTP model. The subject of this International Standard is interface (3): the XA interface by which TMs and RMs interact. Descriptions of the functional components relevant to this International Standard can be found in Section 2.2 on page 5. For more details of the the DTP model as

49、 shown in Figure 2-1, including definitions of all components and interfaces, see Appendix B, Appendix C, Appendix D, and Appendix E. OISOAEC lSO/lEC 14834:1996(E) 2.2 Definitions 2.2.1 Transaction A transaction is a complete unit of work. It may comprise many computational tasks, which may include user interface, data retrieval, and communications. A typical transaction modifies shared resources. (The referenced OSI TP standard (model) defines transactions more precisely.) Transactions must be able to be rolled back. A human user may roll back the transaction in response to a real-wor

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 标准规范 > 国际标准 > 其他

copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
备案/许可证编号:苏ICP备17064731号-1