1、National Standard of CanadaCAN/CSA-ISO/IEC 14834-01(ISO/IEC 14834:1996)International Standard ISO/IEC 14834:1996 (first edition, 1996-08-15), has been adopted withoutmodification as CSA Standard CAN/CSA-ISO/IEC 14834-01, which has been approved as a National Standardof Canada by the Standards Counci
2、l of Canada.ISBN 1-55324-390-0 March 2001Reference numberISO/IEC 14834: 1996(E)The Canadian Standards Association, which The Standards Council of Canada is theoperates under the name CSA International coordinating body of the National Standards system, (CSA), under whose auspices this National Stand
3、ard has a federation of independent, autonomousbeen produced, was chartered in 1919 and accredited by organizations working towards the furtherthe Standards Council of Canada to the National development and improvement of voluntaryStandards system in 1973. It is a not-for-profit, standardization in
4、the national interest.nonstatutory, voluntary membership association The principal objects of the Council are to foster engaged in standards development and certification and promote voluntary standardization as a means activities. of advancing the national economy, benefiting theCSA standards refle
5、ct a national consensus of producers health, safety, and welfare of the public, assisting and users including manufacturers, consumers, and protecting the consumer, facilitating domestic retailers, unions and professional organizations, and and international trade, and furthering internationalgovern
6、mental agencies. The standards are used widely cooperation in the field of standards.by industry and commerce and often adopted by A National Standard of Canada is a standard whichmunicipal, provincial, and federal governments in their has been approved by the Standards Council ofregulations, partic
7、ularly in the fields of health, safety, Canada and one which reflects a reasonablebuilding and construction, and the environment. agreement among the views of a number of capableIndividuals, companies, and associations across Canada individuals whose collective interests provide to theindicate their
8、 support for CSAs standards development greatest practicable extent a balance ofby volunteering their time and skills to CSA Committee representation of producers, users, consumers, andwork and supporting the Associations objectives others with relevant interests, as may be appropriatethrough sustai
9、ning memberships. The more than 7000 to the subject in hand. It normally is a standardcommittee volunteers and the 2000 sustaining which is capable of making a significant and timelymemberships together form CSAs total membership contribution to the national interest.from which its Directors are cho
10、sen. Sustaining Approval of a standard as a National Standard ofmemberships represent a major source of income for Canada indicates that a standard conforms to theCSAs standards development activities. criteria and procedures established by the StandardsThe Association offers certification and testi
11、ng services Council of Canada. Approval does not refer to thein support of and as an extension to its standards technical content of the standard; this remains thedevelopment activities. To ensure the integrity of its continuing responsibility of the accreditedcertification process, the Association
12、regularly and standards-development organization.continually audits and inspects products that bear the Those who have a need to apply standards areCSA Mark. encouraged to use National Standards of CanadaIn addition to its head office and laboratory complex in whenever practicable. These standards a
13、re subject Toronto, CSA has regional branch offices in major centres to periodic review; therefore, users are cautioned across Canada and inspection and testing agencies in to obtain the latest edition from the organizationeight countries. Since 1919, the Association has preparing the standard.devel
14、oped the necessary expertise to meet its corporate The responsibility for approving National Standards mission: CSA is an independent service organization of Canada rests with thewhose mission is to provide an open and effective forum Standards Council of Canadafor activities facilitating the exchan
15、ge of goods and 270 Albert Street, Suite 200services through the use of standards, certification and Ottawa, Ontario, K1P 6N7related services to meet national and international needs. CanadaFor further information on CSA services, write toCSA International178 Rexdale BoulevardToronto, Ontario, M9W 1
16、R3CanadaAlthough the intended primary application of this Standard is stated in its Scope, it is importantto note that it remains the responsibility of the users to judge its suitability for their particular purpose.Registered trade-mark of Canadian Standards AssociationInformation technology Distri
17、buted TransactionCAN/CSA-ISO/IEC 14834-01 Processing The XA SpecificationMarch 2001 CSA/1CAN/CSA-ISO/IEC 14834-01Information technology Distributed TransactionProcessing The XA SpecificationCSA PrefaceStandards development within the Information Technology sector is harmonized with internationalstan
18、dards development. Through the CSA Technical Committee on Information Technology (TCIT),Canadians serve as the Canadian Advisory Committee (CAC) on ISO/IEC Joint Technical Committee 1 onInformation Technology (ISO/IEC JTC1) for the Standards Council of Canada (SCC), the ISO memberbody for Canada and
19、 sponsor of the Canadian National Committee of the IEC. Also, as a member of theInternational Telecommunication Union (ITU), Canada participates in the International Telegraph andTelephone Consultative Committee (ITU-T).This International Standard was reviewed by the CSA TCIT under the jurisdiction
20、of the StrategicSteering Committee on Information Technology and deemed acceptable for use in Canada. (A committeemembership list is available on request from the CSA Project Manager.) From time to time, ISO/IEC maypublish addenda, corrigenda, etc. The CSA TCIT will review these documents for approv
21、al and publication. For a listing, refer to the CSA Information Products catalogue or CSA Info Update or contact a CSA Salesrepresentative. This Standard has been formally approved, without modification, by these Committeesand has been approved as a National Standard of Canada by the Standards Counc
22、il of Canada.March 2001 CSA International 2001All rights reserved. No part of this publication may be reproduced in any form whatsoever without the prior permission ofthe publisher. ISO/IEC material is reprinted with permission. Inquiries regarding this National Standard of Canada shouldbe addressed
23、 to CSA International, 178 Rexdale Boulevard, Toronto, Ontario, M9W 1R3.INTERNATIONAL STANDARD ISO/IEC 14834 First edition 1996-08-I 5 Information technology - Distributed Transaction Processing - The XA Specification Technologies de /information - Traitemen t transactionnel rkparti - La spkifica bo
24、n XA Reference number ISO/1 EC 14834: 1996(E) ISO/IEC 14834: 1996(E) Contents Chapter Chapter Chapter Chapter 0 ISO/IEC 1996 1 1.1 I .2 1.3 1.4 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 3 31 . 32 3:3 3.3.1 3.4 35 . 36 . 4 4.1 4.2 43 414 General . Sco
25、pe X/Open DTP Model Document Structure . Normative References . Model and Definitions X/Open DTP Model Definitions Transaction . Distributed Transaction Processing . Application Program Resource Manager . Global Transactions Transaction Branches . Transaction Manager Thread of Control Tightly- and L
26、oosely-coupled Threads . Transaction Completion and Recovery . Rolling Back the Global Transaction Protocol Optimisations Heuristic Branch Completion . Failures and Recovery Interface Overview Index to Services in the XA Interface . Opening and Closing Resource Managers . Association of Threads with
27、 Transaction Branches . Registration of Resource Managers Branch Completion Synchronous, Non-blocking, and Asynchronous Modes . Failure Recovery The “xa.h”Header Naming Conventions Transaction Identification Resource Manager Switch . Flag Definitions 3 4 5 5 5 5 5 6 6 6 7 7 8 8 8 9 9 11 12 13 14 15
28、16 17 17 19 19 19 21 22 All rights reserved. Unless otherwise specified, no part of this publication may be repro- duced or utilized in any form or by any means, electronic or mechanical, including photo- copying and microfilm, without permission in writing from the publisher. lSO/IEC Copyright Offi
29、ce l Case postale 56 l CH-1211 Geneve 20 l Switzerland Printed in Switzerland ii olSO/IEC ISO/IEC 14834:1996(E) 4.5 Chapter 5 Chapter 6 61 . 62 62 1 6:3 64 . Chapter 7 Implementation Requirements . 65 7.1 Application Program Requirements 65 7.2 Resource Manager Requirements 66 7.2.1 The Application
30、Program (Native) Interface . 68 7.3 Transaction Manager Requirements . 69 Appendix A Appendix B Bl . B2 . B3 . 84 . Appendix C DTP Model - Definitions . Cl . Transaction Definitions . c2 . Model Definitions . Appendix D Dl . D2 D2 1 . D2 2 . D-2 3 . D-2 4 . . Return Codes . . . . . . . . . . . . . .
31、 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Reference Manual Pages 27 m-ql() . 28 ax-unreg( ) . 31 xa-close( ) 32 xa-commit( ) . 34 xa-complete() 37 xa-end( ) 38 xa-forget() . 41 xuwn() 43 xa-prepare( ) 45 xa-recover( ) . 48 xa-rollback( ) 50 xa-start() . 53 St
32、ate Tables Resource Manager lnitialisation . Association of Threads of Control with Transactions . Dynamic Registration of Threads Transaction States . Asynchronous Operations Complete Text of “xa.h” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
33、. . . . . . . DTP Model - Introduction . Overview . Benefits of X/Open DTP . Areas Not Addressed . Relationship to International Standards DTP Model - The Model 81 Functional Model 82 Functional Components . 83 Application Program (AP) 83 Transaction Manager (TM) 83 Resource Manager (RM) . 83 Commun
34、ication Resource Manager (CRM) . 84 24 57 58 59 59 61 63 71 75 75 76 76 76 77 77 79 . . . III ISO/IEC 14834:1996(E) I SO/I EC 03 D-3 1 . D-3 2 . . D4 D4 1 . D4 2 . D-4 3 . D4 4 . D-4 5 . D-4 6 . . D5 D5 1 . D-5 2 . D5 3 . D5 4 . D5 5 . D5 6 . D-5 7 . D5 8 . . D6 D6 1 * D6 2 . D6 3 . D6 4 . D6 5 . D6
35、 6 . l D7 D7 1 . D-7 2 . D7 3 . D7 4 . . D8 . Appendix E DTP Model - Frequently Asked Questions . . . . . . . . . . . . . . . . . . . 99 Appendix F Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
36、 . . . . . . . . 103 List of Figures 2-1 3-1 C-l D-l D-2 E-l Interfaces between Functional Components Functional Component Interfaces . Data Interfaces . Activity Involving a Single AP . Transaction Initiation . Transaction Association Transaction Commitment Transaction Rollback . Heuristic Transact
37、ion Completion Recovery after Failure . Distributed Communication Facilities Communication within TM Domains Communication across TM Domains . Sharing Resources across TM Domains . Global Transaction Demarcation . Global Transaction Tree Structure . Global Transactions and the Transaction Tree . Tig
38、htly- and Loosely-coupled Threads . Commitment Coordination . Activity Involving Two or More APs . Transaction Initiation . Transaction Association Transaction Commitment Transaction Rollback . Heuristic Transaction Completion Recovery after Failure . CRM Communication Paradigms with APs . The TxRPC
39、 Interface The XATMI Interface . The CPI-C Version 2 Interface Relationships between the Communication Paradigms High-level TP 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 . . . . . . . . . . . . . . . .
40、. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Functional Components and Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The XA Interface . . . .
41、. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A TM Domain with Four Instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .” Functional Components and
42、 Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Global Transaction Tree Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Projection of Model onto Processes . . . . . . . . . . . . . . . .
43、 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 11 79 82 92 101 105 iV oISO/lEC ISO/IEC 14834:1996(E) List of Tables 4-1 6-l 6-2 6-3 6-4 6-5 Flags used in Particular Function Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
44、 State Table for Resource Manager lnitialisation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 State Table for Transaction Branch Association .a,* 59 State Table for Transaction Branch Association (Dynamic Registration) 60 State Table for Transaction Branches . . . . . .
45、 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 State Table for Asynchronous Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 ISO/IEC 14834:1996(E) 0 lSO/IEC Foreword IS0 (the International Organizat
46、ion for Standardization) and IEC (the Inter- national Electrotechnical Commission) form the specialized system for worldwide standardization. National bodies that are members of IS0 or IEC participate in the development of International Standards through technical committees established by the respe
47、ctive 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, governmental and non-governmental, in liaison with IS0 and IEC, also take part in the work. In the field of infor
48、mation 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 national bodies for vot- ing. Publication as an International Standard requires approval by at least 75 % of the nation
49、al 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 Technical Committee lSO/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. vi 0 lSO/IEC ISOJIEC 14834: 1996(E) Introduction (This introduction is not a normative part of ISO/IEC 14834, Information technolog