CN101046815A - Affairs coordinator, resource using end, service end and distribution affairs process method - Google Patents

Affairs coordinator, resource using end, service end and distribution affairs process method Download PDF

Info

Publication number
CN101046815A
CN101046815A CNA2007100644121A CN200710064412A CN101046815A CN 101046815 A CN101046815 A CN 101046815A CN A2007100644121 A CNA2007100644121 A CN A2007100644121A CN 200710064412 A CN200710064412 A CN 200710064412A CN 101046815 A CN101046815 A CN 101046815A
Authority
CN
China
Prior art keywords
transaction
request
resource
adapter
affairs
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CNA2007100644121A
Other languages
Chinese (zh)
Inventor
刘诗凯
沈青春
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CNA2007100644121A priority Critical patent/CN101046815A/en
Publication of CN101046815A publication Critical patent/CN101046815A/en
Priority to PCT/CN2008/070471 priority patent/WO2008110115A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/541Interprogram communication via adapters, e.g. between incompatible applications

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention relates to transaction coordinator, transaction resource usage end and service end and method for processing distributed transaction by utilizing transaction resource usage end and service end. It is characterized by that said method includes the following steps: the usage end can be used for registering transaction resource customer end; commiting commitment request by utilizing registered transaction resource customer end; canceling transaction resource customer end; service end utilizes transaction identification curried in the service operation request to search correspondent transaction adopter; making current transaction be substituted for the described transaction adapter; executing service operation; making resource supervisor be registered into transaction adapter correspondent to the transaction identification; according to the transaction identification carried in commitment request making the described commitment request be transferred to correspondent transaction adapter; and utilizing registered resource supervisor to execute commitment.

Description

Affairs coordinator, resource use side, service end and distributed transaction processing method
Technical field
The present invention relates to distributed transaction processing, relate in particular to affairs coordinator, transaction resource use side, service end and the transaction resource use side that to realize interdepartmental system distributed transaction and handle, the method that service end is handled distributed transaction.
Background technology
Broad development along with enterprise application system, financial management system, administrative analysis system, business system, exist increasing information interaction between systems such as Customer Relationship Management Services, logistic management system, charge system, this requires business data to have consistance.The conforming demand of business data requires data manipulation to have atomicity, consistance, isolation, persistence (Atomicity, Consistency, Isolation, Durability, be called for short ACID), promptly require to carry out distributed transaction and handle, and issued transaction need realize between a plurality of transactional resources.
Affairs are meant the sequence of operations of carrying out as the unity logic unit of work.Distributed transaction is meant the ACID affairs between two or more transaction resources (such as, two independent databases).
Existing affairs Unified frame based on J2EE connection framework (J2EE Connector Architecture is called for short JCA) has realized that the affairs of interdepartmental system are unified.Under this framework, adapter resource (ResourceAdapter) provides connection (Connection) and has been connected factory (Connection Factory) interface, connects factory and is responsible for creating and being connected of application system (Application System).Link the connection of management (Connection Manager) unified management different application systems.When connection management receives when connecting the connection request of factory the buffer memory container of connection management from connecting---obtain connection the connection pool (PoolManager).If connection pool does not have available connection, then can call management and connect new physical connection of factory (Managed Connection Factory) establishment.
Existing affairs based on JCA are unified framework and are had following defective: complex interfaces, realize difficulty, even some existing system just can't be realized the standard interface of JCA on mechanism, it is only applicable to the application system based on J2EE standard structure, can not separate never data consistent sexual demand based on J2EE standard or non-Java application system, use C# application etc. as C++.
Summary of the invention
The purpose of the embodiment of the invention is to provide interface simple, meet affairs coordinator, transaction resource use side, transaction resource service end and the transaction resource use side of data consistency requirement, the distributed transaction processing method of service end, realize interdepartmental system distributed transaction processing, and be applicable to based on J2EE, J2SE (Java 2 Standard Edition), multiple application systems such as C++, C#.
To achieve these goals, the embodiment of the invention provides a kind of distributed transaction processing method of transaction resource use side, comprises the steps:
Registration transactions resource client;
Utilize described transaction resource client to submit the submission request that carries Transaction Identifier to the transaction resource service end; And
Nullify the transaction resource client.
To achieve these goals, the embodiment of the invention also provides a kind of distributed transaction processing method of transaction resource service end, comprising: search corresponding transaction adapter according to the Transaction Identifier that carries in the business operation request; Current affairs are replaced with described transaction adapter; Carry out business operation according to described business operation request; Explorer is registered to described transaction adapter; According to submitting to the Transaction Identifier that carries in the request that described submission request is forwarded to described transaction adapter; And by described explorer execution submission.
To achieve these goals, the embodiment of the invention provides a kind of affairs coordinator again, comprising: the transaction proxy module is used for submitting the submission request that carries Transaction Identifier to by the transaction resource client of registration; Registering modules is used to register the transaction resource client that participates in current affairs, and notifies described transaction proxy module with log-on message; Described transaction resource client is at least one; Submit the request forwarding module to, be used for submitting request to the transaction proxy module; And the cancellation module, be used to nullify the transaction resource client of current affairs, and notify described transaction proxy module log-off message.
To achieve these goals, the embodiment of the invention also provides a kind of transaction resource use side, comprising:
Affairs coordinator is used for the coordinate transactions resource, carries out distributed transaction control, and this affairs coordinator comprises: the transaction proxy module is used for submitting the submission request that carries Transaction Identifier to by the transaction resource client of registration; Registering modules is used to register the transaction resource client that participates in current affairs, and notifies the transaction proxy module with log-on message; Described transaction resource client is at least one; Submit the request forwarding module to, be used for submitting request to the transaction proxy module; And nullify module, be used to nullify the transaction resource client of current affairs, and notify the transaction proxy module log-off message;
The business operation request module, the transaction resource client that is used for passing through is submitted the business operation request that carries Transaction Identifier to;
Submit request module to, be used for initiating to submit to request;
The transaction resource client is used for communicating by letter with the transaction resource service end, submits the business operation request to and submits request to.
To achieve these goals, the embodiment of the invention provides a kind of transaction resource service end again, comprising:
The affairs mapping block is used to search the transaction adapter of Transaction Identifier correspondence; This affairs mapping block comprises: transaction adapter is used for and will submits to request to be forwarded to the explorer of registration; Logging modle is used to write down the corresponding relation of Transaction Identifier and transaction adapter and searches module, is used to search the transaction adapter of Transaction Identifier correspondence;
The transaction adapter creation module is used to create transaction adapter, and Transaction Identifier and transaction adapter are saved to described logging modle;
Explorer is used for carrying out submission according to described submission request;
Task manager is used for current affairs are replaced with the registration and the cancellation of described transaction adapter and explorer.
The embodiment of the invention in task manager upper strata control affairs, has realized atomicity, consistance, isolation and the persistence of distributed transaction processing requirements by affairs coordinator, and is simple and easy to use as the transaction adapter of interface; The embodiment of the invention has realized the distributed transaction processing of interdepartmental system, has satisfied the data manipulation conformance requirement based on J2EE, J2SE (Java 2 Standard Edition), multiple application systems such as C++, C#.
Description of drawings
Fig. 1 is first structural representation of embodiment of the invention transaction resource use side;
Fig. 2 is first structural representation of embodiment of the invention transaction resource service end;
Fig. 3 is the structural representation of the distributed transaction disposal system of embodiment of the invention transaction resource use side and transaction resource service end formation;
Fig. 4 is first structural representation of embodiment of the invention affairs coordinator;
Fig. 5 is second structural representation of embodiment of the invention affairs coordinator;
Fig. 6 is second structural representation of embodiment of the invention transaction resource use side;
Fig. 7 is second structural representation of embodiment of the invention transaction resource service end;
Fig. 8 is the first pass figure of the distributed transaction processing method of embodiment of the invention transaction resource use side;
Fig. 9 is the first pass figure of the distributed transaction processing method of embodiment of the invention transaction resource service end;
Figure 10 is second process flow diagram of the distributed transaction processing method of embodiment of the invention transaction resource use side;
Figure 11 is second process flow diagram of the distributed transaction processing method of embodiment of the invention transaction resource service end;
Figure 12 is the 3rd process flow diagram of the distributed transaction processing method of embodiment of the invention transaction resource use side;
Figure 13 is the 3rd process flow diagram of the distributed transaction processing method of embodiment of the invention transaction resource service end.
Embodiment
As shown in Figure 1, first structural representation of embodiment of the invention transaction resource use side.The service that transaction resource use side 1 uses the transaction resource service end to provide by transaction resource client 12.Transaction resource use side 1 comprises affairs coordinator 11, transaction resource client 12, business operation request module 13 and submits request module 14 to.
Affairs coordinator 11 is used for the coordinate transactions resource and carries out distributed transaction control, and transaction resource use side 1 is by affairs coordinator 11 beginning affairs.Transaction resource client 12 is corresponding one by one with transaction resource service end 2 (not shown)s, it is used for communicating by letter with correspondent transaction resource service end 2, submission carries the business operation request of Transaction Identifier and submits request to, realizes the calling service of transaction resource service end 2.Business operation request module 13 is used for submitting the business operation request that carries Transaction Identifier to by transaction resource client 12, and business operation comprises increasing, delete, change, looking into of data and message issue etc.After each transaction resource client 12 receives the business operation request, be registered in the affairs coordinator 11.Submit to request module 14 to be used for initiating to submit to request, this module will submit to request to be sent to affairs coordinator 11, and affairs coordinator 11 sends the request of submitting to by the transaction resource client 12 of registration to transaction resource service end 2.
When affairs relate to a plurality of transaction resource client, the order of the operations that business operation request module 13 can comprise according to affairs sends the business operation request one by one to each corresponding transaction resource client 12 of operation, each transaction resource client receives business operation request post-registration in affairs coordinator 11, thus but a plurality of transaction resources of affairs coordinator 11 unified managements.
Present embodiment has been realized interdepartmental system distributed transaction processing based on non-JCA architecture, is applicable to based on multiple systems such as J2EE, J2SE, C++ and C#.
As shown in Figure 2, be first structural representation of embodiment of the invention transaction resource service end.Transaction resource service end 2 is used for providing Service Source by transaction resource client 12 (not shown)s for transaction resource use side 1 (not shown), and it comprises affairs mapping block 21, explorer 22, task manager 23 and transaction adapter creation module 24.
Affairs mapping block 21 is used to search the transaction adapter of Transaction Identifier correspondence, and this affairs mapping block 21 comprises transaction adapter 211, searches module 212 and logging modle 213.Transaction adapter 211 is used to receive to be submitted request to and will submit to request to be forwarded to the explorer of registration, each transaction adapter 211 is used for the operation of affairs of management transaction resource service end 2 participations, when transaction resource service end 2 had participated in a plurality of affairs, 21 of affairs mapping blocks comprised a plurality of transaction adapter 211.Search module 212 and be used to search the transaction adapter 211 of Transaction Identifier correspondence.Logging modle 213 is used to write down the corresponding relation of Transaction Identifier and transaction adapter.
Explorer 22 is used for submitting to according to submitting to request to carry out, and it supports two-phase commitment protocol.Task manager 23 is used for current affairs are replaced with the registration and the cancellation of described transaction adapter and explorer, and the management transaction resource is as the application system of physical database, the memory database of supporting affairs and support transaction interface.Transaction adapter creation module 24 is used to create transaction adapter 211, after transaction resource service end 2 receives the business operation request, if do not find the Transaction Identifier correspondent transaction adapter, then create transaction adapter 211, and transaction adapter 211 and corresponding Transaction Identifier are saved to logging modle 213.
Present embodiment has been realized interdepartmental system distributed transaction processing based on non-JCA architecture, be responsible for the management of a transaction operation by transaction adapter, transaction adapter as interface is simple and easy to usefulness, is applicable to the multiple application system based on J2EE, J2SE, C++ and C# etc.
As shown in Figure 3, the distributed transaction disposal system structural representation that constitutes for embodiment of the invention transaction resource use side and transaction resource service end.As can be seen, transaction resource use side 1 is connected with transaction resource service system 2 by transaction resource client 12 from this figure, and transaction resource client 12 is corresponding one by one with transaction resource service system 2.
As shown in Figure 4, be embodiment of the invention affairs coordinator first structural representation.Affairs coordinator 11 comprises Registering modules 112, submits request forwarding module 113 to, nullifies module 114 and transaction proxy module 115.
Registering modules 112 is used to register the transaction resource client 12 that participates in current affairs, and notifies transaction proxy module 115 with log-on message.Transaction resource client 12 is registered to Registering modules 112 as Resource Broker.After submitting to request forwarding module 113 to receive the submission request of submitting request module 14 transmissions to, submit the submission request that carries Transaction Identifier to by transaction proxy module 115.Transaction proxy module 115 is managed these affairs of participation in affairs, promptly as the transaction resource client 12 of Resource Broker registration, it submits the submission request that carries Transaction Identifier to by transaction resource client 12, and supports to submit this submission request to two stage ways of submission.Nullify module 114 and be used for after submitting request to, the transaction resource client 12 of current affairs being nullified, and notify transaction proxy module 115 log-off message.
The affairs coordinator based on non-JCA of present embodiment has been realized the distributed transaction management of interdepartmental system, satisfies the data manipulation conformance requirement based on the multiple application system of J2EE, J2SE, C++ and C# etc.
As shown in Figure 5, the affairs coordinator of the embodiment of the invention also can comprise creation module 111, and this module is used to create transaction proxy module 115, and generates Transaction Identifier.
Two stages submitted to be divided into submitting to and prepare and two stages of submit operation, submitting to the preparatory stage, transaction resource is received processing such as request back execution data modification and log record, and the back of finishing dealing with is just made the state of affairs into " can submit to ", whether return results is reported ready then.If all transaction resources are all ready, then enter the submit operation stage.In the submit operation stage, " can submit to " state of affairs changes " submission is finished " state into.
As shown in Figure 6, be embodiment of the invention transaction resource use side second structural representation.Present embodiment is applied to transaction resource use side embodiment one shown in Figure 2 with affairs coordinator 11 shown in Figure 5, and transaction proxy module 115 specifically comprises preparation request module 1151 and operation requests module 1152.
Preparation request module 1151 is used to submit to the submission preparation request that carries Transaction Identifier; Operation requests module 1152 is used for submitting to the transaction resource client of preparing to continue under the case of successful to registration to submit the submit operation request that carries Transaction Identifier to.
In the present embodiment, two stage manner are adopted in the submission of submission request, and promptly the phase one is to submit to prepare, the subordinate phase submit operation, and like this, use side is the control data operational consistency effectively, thereby realizes striding the affairs unification of task manager.
As shown in Figure 7, be transaction resource service end embodiment two structural representations of the present invention.Present embodiment and difference embodiment illustrated in fig. 2 are that affairs mapping block 21 has further added removing module 214, and task manager 23 comprises that specifically affairs handover module 231, resource registering module 232 and resource nullify module 233.
Affairs handover module 231 is used for after receiving the business operation request, current affairs are replaced with the transaction adapter 211 of Transaction Identifier correspondence by the affairs of task manager 23, and after carrying out submission, current affairs are replaced with the affairs of task manager 23 by transaction adapter 211.
The explorer 22 that resource registering module 232 is used for participating in these affairs is registered to the transaction adapter 211 of Transaction Identifier correspondence, thereby transaction adapter 211 can be forwarded to the submission request that receives corresponding explorer 22.
Resource is nullified module 233 and is used for after carrying out submission explorer 22 being nullified from transaction adapter 211.
The removing module 213 of affairs mapping block 21 is used for after carry out submitting to, the transaction adapter 211 of deletion Transaction Identifier correspondence and the corresponding relation of Transaction Identifier and transaction adapter, thereby timely Free up Memory.
As shown in Figure 8, the distributed transaction processing method first pass figure for the transaction resource use side of the embodiment of the invention comprises the steps:
Steps A 101, registration transactions resource client;
The transaction resource client of steps A 102, utilization registration is submitted the submission request that carries Transaction Identifier to the transaction resource service end;
Steps A 103, cancellation transaction resource client.
Present embodiment has realized that based on non-JCA architecture interdepartmental system distributed transaction handles, and is applicable to based on the application system of J2SE, J2EE and based on the non-Java application system of C++, C# etc.
As shown in Figure 9, the distributed transaction processing method first pass figure for embodiment of the invention transaction resource service end comprises the steps:
Step B101, according to the Transaction Identifier that carries in the business operation request, search the transaction adapter of Transaction Identifier correspondence;
Step B102, current affairs are replaced with transaction adapter by the affairs of task manager;
Step B103, carry out business operation according to the business operation request, business operation comprises increasing, delete, change, looking into of data and message issue etc.;
Step B104, explorer is registered to the transaction adapter of Transaction Identifier correspondence;
Step B105, according to submitting to the Transaction Identifier that carries in the request will submit request to be forwarded to correspondent transaction adapter, transaction adapter is carried out submission by the explorer of registration.
Present embodiment has realized that based on non-JCA architecture interdepartmental system distributed transaction handles, and is applicable to based on J2SE or non-Java application system, is responsible for the management of a transaction operation by transaction adapter, is simple and easy to use as the transaction adapter of interface.
As shown in figure 10, be distributed transaction processing method second process flow diagram of embodiment of the invention transaction resource use side.The present embodiment affairs coordinator adopts two stage ways of submission by the operation of transaction proxy module management coordinate transactions when submitting request to, thereby control affairs is unified effectively for use side.Present embodiment comprises the steps:
Steps A 201, establishment transaction proxy module generate Transaction Identifier;
Steps A 202, send the business operation request to the transaction resource client that participates in affairs;
203 pairs of transaction resource clients of steps A are registered and are notified the transaction proxy module with log-on message;
Steps A 204 transaction resource clients are submitted the business operation request that carries Transaction Identifier to the transaction resource service end;
Steps A 205, judge whether success of business operation request, if successful execution steps A 206;
Steps A 206, submit to submit request to the transaction proxy module;
Steps A 207, transaction proxy module are submitted the submission preparation request that carries Transaction Identifier to by the transaction resource client of registration to the transaction resource service end;
Whether steps A 208, judgement submit to preparation successful, if successful execution steps A 209;
Steps A 209, transaction proxy module are submitted the submit operation request that carries Transaction Identifier to by the transaction resource client of registration to the transaction resource service end.
In the present embodiment, submit to the submission of request to adopt two stage ways of submission, promptly the phase one is submitted preparation request to, subordinate phase is submitted the submit operation request to, like this, use side is the control data operational consistency effectively, thereby realizes striding the affairs unification of task manager.
As shown in figure 11, be distributed transaction processing method second process flow diagram of embodiment of the invention transaction resource service end.Present embodiment cooperates two stage ways of submission of transaction resource use side, comprises the steps:
Step B201, the request of reception business operation are searched corresponding transaction adapter according to the Transaction Identifier that carries in the business operation request;
Step B202, current affairs are replaced with transaction adapter by the affairs of task manager;
Step B203, execution business operation;
Step B204, explorer is registered to the transaction adapter of Transaction Identifier correspondence;
Preparation request is submitted in step B205, reception to, and according to submitting to the Transaction Identifier that carries in the preparation request will submit to preparation request to be forwarded to correspondent transaction adapter, transaction adapter is carried out submission by the explorer of registration and prepared and return execution result;
Step B206, the request of reception submit operation will submit to preparation request to be forwarded to correspondent transaction adapter according to the Transaction Identifier that carries in the submit operation request, and transaction adapter is carried out submit operation by the explorer of registration.
Present embodiment has been realized the interdepartmental system transaction coordination based on non-JCA, prepare interface by the submission that exposes task manager, the affairs unification can be by the unified control of transaction resource use side, in the upper strata of task manager control affairs, realize atomicity, consistance, isolation and the persistence of distributed transaction processing requirements.
As shown in figure 12, be distributed transaction processing method the 3rd process flow diagram of embodiment of the invention transaction resource use side.The transaction resource that participates in affairs in the present embodiment has a plurality of, when creating affairs, need initiate service request one by one to a plurality of transaction resource clients, it is registered, and send preparation request and the submit operation request submitted to one by one.Present embodiment comprises the steps:
Steps A 301, transaction resource use side are used and are begun affairs by affairs coordinator;
Steps A 302, affairs coordinator are created the transaction proxy module and are also generated Transaction Identifier, and this Transaction Identifier can be transaction sequence number;
Steps A 303, transaction resource use side are used to the transaction resource client that participates in affairs and are sent the business operation request;
Steps A 304, transaction resource client are registered to affairs coordinator as Resource Broker;
Steps A 305, affairs coordinator are notified the transaction proxy module with log-on message;
Steps A 306, transaction resource client are submitted the business operation request that carries Transaction Identifier to the transaction resource service end;
Steps A 307, judge whether success of business operation request, if successful execution steps A 308; For each transaction resource, whether the successful method possibility is different to judge each business operation request, and no matter the system that has runs succeeded is still failed, and all can return response, the system that has only can return response when appearance is unusual, this need determine according to the concrete definition of system;
Steps A 308, all transaction resource clients that judge whether to participate in these affairs are all registered, and have sent the business operation request, if, execution in step A309, otherwise, execution in step A303;
Steps A 309, transaction resource use side are used to affairs coordinator and are submitted request to;
Steps A 310, affairs coordinator are submitted request to the transaction proxy module forwards;
Steps A 311, transaction proxy module are submitted the submission preparation request that carries Transaction Identifier to the transaction resource client of registration;
Steps A 312, transaction resource client are submitted the submission preparation request that carries Transaction Identifier to the transaction resource service end;
Steps A 313, transaction resource client receive the response that the transaction resource service end is returned
Steps A 314, transaction resource client are forwarded to the transaction proxy module with response;
Steps A 315, transaction proxy module judge whether the submission preparation is successful, if successful execution steps A 316;
Steps A 316, judge whether that each transaction resource client to registration sends and submit preparation request to, if, execution in step A317, otherwise execution in step A311;
Steps A 317, transaction proxy module are submitted the submit operation request that carries Transaction Identifier to the transaction resource client of registration;
Steps A 318, transaction resource client are submitted the submit operation request that carries Transaction Identifier to the transaction resource service end;
Steps A 319, affairs coordinator are nullified the transaction resource client;
Steps A 320, affairs coordinator are notified the transaction proxy module with log-off message;
Steps A 321, judge whether to send submit operation request to each transaction resource client of registration, if not, execution in step A317.
Present embodiment has been realized the interdepartmental system transaction coordination based on non-JCA, prepare interface by the submission that exposes task manager, it is unified that but the affairs coordinator ACTIVE CONTROL is crossed over the affairs of task manager, in the upper strata of task manager control affairs, realize atomicity, consistance, isolation and the persistence of distributed transaction processing requirements.
As shown in figure 13, be distributed transaction processing method the 3rd process flow diagram of embodiment of the invention transaction resource service end.The execution of affairs relates to a plurality of explorers in the present embodiment, carrying out business operation and carrying out when submitting to, transmits request to each explorer successively, nullifies each explorer and deletes Transaction Identifier in the affairs back that is finished.Present embodiment specifically comprises the steps:
Step B301, transaction resource service end are used the business operation request that receives;
Step B302, transaction resource service end are used and are sent out query requests to the affairs mapping block;
Step B303, affairs mapping block are searched the transaction adapter of Transaction Identifier correspondence; If find, execution in step B306, otherwise, execution in step B304;
Step B304, transaction resource service end are used and are created transaction adapter;
Step B305, transaction resource service end are preserved transaction adapter and Transaction Identifier;
Step B306, transaction resource service end are replaced with current affairs the transaction adapter of Transaction Identifier correspondence by the affairs of task manager;
Step B307, transaction resource service end are used and are carried out business operation;
Call a plurality of explorers in step B308, the execution business operation process;
Step B309, each explorer obtain affairs;
Step B310, each explorer are registered to transaction adapter;
Step B311, transaction resource service end are used to receive and are submitted preparation request to;
Step B312, transaction resource service end are used to the corresponding transaction adapter of affairs mapping block inquiry transaction sign;
Step B313, affairs mapping block are searched the transaction adapter of Transaction Identifier correspondence and are returned lookup result to the application of transaction resource service end;
Step B314, transaction resource service end are used and will be submitted to preparation request to be forwarded to the transaction adapter of Transaction Identifier correspondence;
Step B315, transaction adapter send the submission preparation request to the explorer of registration;
Step B316, explorer are carried out to submit to and are prepared, and return execution result to transaction adapter;
Step B317, transaction adapter judge whether the submission preparation is successful, if, execution in step B318;
Step B318, transaction adapter judge whether the equal executed submission of each explorer of registering preparation, if, execution in step B319, otherwise, execution in step B315;
Step B319, transaction adapter are used to the transaction resource service end and are returned execution result;
Step B320, transaction resource service end are used and are returned execution result to the transaction resource client;
Step B321, transaction resource service end are used the submit operation request that receives;
Step B322, transaction resource service end are used to the corresponding transaction adapter of affairs mapping block inquiry transaction sign;
Step B323, affairs mapping block are searched the transaction adapter of Transaction Identifier correspondence and are returned lookup result to the application of transaction resource service end;
Step B324, transaction resource service end are used the transaction adapter that the submit operation request is forwarded to the Transaction Identifier correspondence;
Step B325, transaction adapter send the submit operation request to the explorer of registration;
Step B326, explorer are carried out submit operation; From transaction adapter, nullify explorer;
Step B327, transaction adapter judge whether the equal executed submit operation of each explorer of registering, if, execution in step B328, otherwise, execution in step B325;
The transaction adapter of the Transaction Identifier correspondence in step B328, the transaction resource service end deletion affairs mapping block;
Step B329, the just current affairs of transaction resource service end are replaced with the affairs of task manager by transaction adapter.
Present embodiment has been realized the eventful affair resource coordination based on non-JCA, prepare interface by the submission that exposes task manager, the affairs unification can be by the unified control of transaction resource use side, in the upper strata of task manager control affairs, realize atomicity, consistance, isolation and the persistence of distributed transaction processing requirements.
The embodiment of the invention has realized based on the affairs of non-JCA unified, has satisfied based on the application system of J2EE, J2SE (Java 2 Standard Edition) and based on the data manipulation conformance requirement of the non-Java application system of C++, C# etc.; Interface is prepared in the submission that exposes task manager, and is unified by the affairs of use side control affairs manager; In task manager upper strata control affairs, realized atomicity, consistance, isolation and the persistence of distributed transaction processing requirements, and compared that interface is simple and easy to use with the JCA framework.
Should be noted that at last: above embodiment is only in order to illustrate that technical scheme of the present invention is not intended to limit; The specific embodiment of the present invention made amendment or the part technical characterictic is equal to replacement, and do not break away from technical solution of the present invention spirit, it all should be encompassed in the middle of the technical scheme scope that the present invention asks for protection.

Claims (23)

1, a kind of distributed transaction processing method of transaction resource use side is characterized in that, described method comprises the steps:
Registration transactions resource client;
Utilize described transaction resource client to submit the submission request that carries Transaction Identifier to the transaction resource service end; And
Nullify described transaction resource client.
2, the distributed transaction processing method of transaction resource use side according to claim 1 is characterized in that, also comprises the steps: to create the transaction proxy module before the step of described registration transactions resource client; And generation Transaction Identifier; Described transaction proxy module is used for submitting the submission request that carries Transaction Identifier to by the transaction resource client of registration.
3, the distributed transaction processing method of transaction resource use side according to claim 2, it is characterized in that, after the step of described generation Transaction Identifier, described distributed transaction processing method also comprises: the step that sends the business operation request that carries Transaction Identifier to the transaction resource client.
4, the distributed transaction processing method of transaction resource use side according to claim 2 is characterized in that, also comprises after the step that the transaction resource client is registered: the step of log-on message being notified the transaction proxy module.
5, the distributed transaction processing method of transaction resource use side according to claim 1, it is characterized in that described transaction resource client by registration submits to the step of the submission request that carries Transaction Identifier to be specially to the transaction resource service end: adopt two stage ways of submission to submit the submission request that carries Transaction Identifier to the transaction resource service end by the transaction resource client of registration.
6, the distributed transaction processing method of transaction resource use side according to claim 3, it is characterized in that described step to the request of transaction resource client transmission business operation is specially: send the business operation request to each transaction resource client that participates in current affairs successively.
7, according to any described distributed transaction processing method of claim 1 to 6, it is characterized in that the step of described registration transactions resource client is specially: registration participates in each transaction resource client of current affairs successively.
8, according to the distributed transaction processing method of any described transaction resource use side of claim 1 to 6, it is characterized in that, described transaction resource client by registration submits to the step of the submission request that carries Transaction Identifier to be specially to the transaction resource service end: a plurality of transaction resource clients to registration are submitted the submission preparation request that carries Transaction Identifier successively to, if all success is then submitted the submit operation request that carries Transaction Identifier to successively to these a plurality of transaction resource clients.
9, a kind of distributed transaction processing method of transaction resource service end is characterized in that, described method comprises:
Search corresponding transaction adapter according to the Transaction Identifier that carries in the business operation request;
Current affairs are replaced with described transaction adapter;
Carry out business operation according to described business operation request;
Explorer is registered to described transaction adapter;
According to submitting to the Transaction Identifier that carries in the request that described submission request is forwarded to described transaction adapter; And
Carry out submission by described explorer.
10, the distributed transaction processing method of transaction resource service end according to claim 9, it is characterized in that, after the described step of searching corresponding transaction adapter according to the Transaction Identifier that carries in the business operation request, if there is not the transaction adapter of Transaction Identifier correspondence, then create transaction adapter, and the corresponding relation of record Transaction Identifier and transaction adapter.
11, the distributed transaction processing method of transaction resource service end according to claim 9, it is characterized in that, after carrying out submission, delete the corresponding relation of described transaction adapter and described Transaction Identifier and transaction adapter, and current affairs are replaced with the affairs of task manager by transaction adapter.
12, the processing distributed transaction processing method of transaction resource service end according to claim 9, it is characterized in that, described according to submitting to the Transaction Identifier that carries in the request that the step that described submission request is forwarded to described transaction adapter is specially: as, will to submit to request to be forwarded to this transaction adapter according to submitting to the Transaction Identifier that carries in the request to search corresponding transaction adapter.
13, a kind of affairs coordinator is characterized in that, described affairs coordinator comprises:
The transaction proxy module is used to utilize the transaction resource client of registration to submit the submission request that carries Transaction Identifier to;
Registering modules is used to register the transaction resource client that participates in current affairs, and notifies described transaction proxy module with log-on message, and described transaction resource client is at least one;
Submit the request forwarding module to, be used for submitting request to the transaction proxy module forwards; And
Nullify module, be used to nullify the transaction resource client of current affairs, and notify described transaction proxy module log-off message.
14, affairs coordinator according to claim 13 is characterized in that, described affairs coordinator also comprises: creation module, be used to create the transaction proxy module, and generate Transaction Identifier.
According to claim 13 or 14 described affairs coordinators, it is characterized in that 15, described transaction proxy module is specially and adopts two stage ways of submission to submit the transaction proxy module of the submission request that carries Transaction Identifier to.
According to claim 13 or 14 described affairs coordinators, it is characterized in that 16, described transaction proxy module specifically comprises:
The preparation request module is used to submit to the submission preparation request that carries Transaction Identifier;
The operation requests module is used for submitting the submit operation request that carries Transaction Identifier to the transaction resource client of registration.
17, a kind of transaction resource use side is characterized in that, described transaction resource use side comprises:
Affairs coordinator is used for the coordinate transactions resource, carries out distributed transaction control; This affairs coordinator comprises:
The transaction proxy module is used for submitting the submission request that carries Transaction Identifier to by the transaction resource client of registration;
Registering modules is used to register the transaction resource client that participates in current affairs, and notifies the transaction proxy module with log-on message; Described transaction resource client is at least one;
Submit the request forwarding module to, be used for submitting request to the transaction proxy module forwards; And
Nullify module, be used to nullify the transaction resource client of current affairs, and notify the transaction proxy module log-off message;
The business operation request module, the transaction resource client that is used for passing through is submitted the business operation request that carries Transaction Identifier to; And
Submit request module to, be used for initiating to submit to request;
The transaction resource client is used for communicating by letter with the transaction resource service end, submits the business operation request to and submits request to.
18, transaction resource use side according to claim 17 is characterized in that, described affairs coordinator also comprises: creation module, be used to create the transaction proxy module, and generate Transaction Identifier.
19, transaction resource use side according to claim 17 is characterized in that, described transaction proxy module is specially and adopts two stage ways of submission to submit the transaction proxy module of the submission request that carries Transaction Identifier to.
20, transaction resource use side according to claim 17 is characterized in that, described transaction proxy module specifically comprises:
The preparation request module is used to submit to the submission preparation request that carries Transaction Identifier;
The operation requests module is used for submitting the submit operation request that carries Transaction Identifier to the transaction resource client of registration.
21, a kind of transaction resource service end is characterized in that, described transaction resource service end comprises:
The affairs mapping block is used to search the transaction adapter of Transaction Identifier correspondence; This affairs mapping block comprises:
Transaction adapter is used for and will submits to request to be forwarded to the explorer of registration;
Logging modle is used to write down the corresponding relation of Transaction Identifier and transaction adapter; And
Search module, be used to search the transaction adapter of Transaction Identifier correspondence;
The transaction adapter creation module is used to create transaction adapter, and Transaction Identifier and transaction adapter are saved to described logging modle;
Explorer is used for carrying out submission according to described submission request; And
Task manager is used for current affairs are replaced with the registration and the cancellation of described transaction adapter and explorer.
22, transaction resource service end according to claim 21 is characterized in that, described transaction management implement body comprises:
The affairs handover module is used for current affairs are replaced with the transaction adapter of Transaction Identifier correspondence by the affairs of task manager, and after carrying out submission, current affairs is replaced with the affairs of task manager by transaction adapter;
The resource registering module is used for explorer is registered to the transaction adapter of Transaction Identifier correspondence;
Resource is nullified module, is used for explorer is nullified from transaction adapter.
23, according to claim 21 or 22 described transaction resource service ends, it is characterized in that described affairs mapping block further comprises: removing module is used for after carrying out submission the transaction adapter of deletion Transaction Identifier correspondence.
CNA2007100644121A 2007-03-14 2007-03-14 Affairs coordinator, resource using end, service end and distribution affairs process method Pending CN101046815A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CNA2007100644121A CN101046815A (en) 2007-03-14 2007-03-14 Affairs coordinator, resource using end, service end and distribution affairs process method
PCT/CN2008/070471 WO2008110115A1 (en) 2007-03-14 2008-03-11 Transaction coordinator, resource using terminal, service terminal, and method of distributed transaction processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2007100644121A CN101046815A (en) 2007-03-14 2007-03-14 Affairs coordinator, resource using end, service end and distribution affairs process method

Publications (1)

Publication Number Publication Date
CN101046815A true CN101046815A (en) 2007-10-03

Family

ID=38771431

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2007100644121A Pending CN101046815A (en) 2007-03-14 2007-03-14 Affairs coordinator, resource using end, service end and distribution affairs process method

Country Status (2)

Country Link
CN (1) CN101046815A (en)
WO (1) WO2008110115A1 (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008110115A1 (en) * 2007-03-14 2008-09-18 Huawei Technologies Co., Ltd. Transaction coordinator, resource using terminal, service terminal, and method of distributed transaction processing
CN102347986A (en) * 2011-10-17 2012-02-08 百度在线网络技术(北京)有限公司 Multi-transaction synchronized cooperation management method, system and device thereof
CN102541847A (en) * 2010-12-08 2012-07-04 金蝶软件(中国)有限公司 Method and device for loading resource files, and ERP (Enterprise Resource Planning) system
WO2015062113A1 (en) * 2013-10-29 2015-05-07 华为技术有限公司 Affair processing method and device
CN106571958A (en) * 2016-11-02 2017-04-19 新智数字科技有限公司 Method and device for building communication connection with SAP system
CN107016029A (en) * 2016-12-13 2017-08-04 阿里巴巴集团控股有限公司 A kind of processing method of business datum, apparatus and system
CN107045453A (en) * 2016-02-05 2017-08-15 慧与发展有限责任合伙企业 Two-phase commitment protocol for distributed transaction is mixed
CN107329809A (en) * 2017-07-05 2017-11-07 国网信息通信产业集团有限公司 A kind of distributed transaction processing method and system towards multi-data source
CN107528912A (en) * 2017-09-11 2017-12-29 金蝶软件(中国)有限公司 A kind of automatic method, system and relevant apparatus for realizing distributing real time system
CN108491252A (en) * 2018-03-13 2018-09-04 万惠投资管理有限公司 distributed transaction processing method and distributed system
CN114422398A (en) * 2021-12-28 2022-04-29 中国电信股份有限公司 Transaction node abnormity identification system, method and device

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102306197B (en) * 2011-09-22 2013-07-03 用友软件股份有限公司 Device and method for guaranteeing consistency of data-source-crossing operation results

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5920863A (en) * 1997-05-31 1999-07-06 International Business Machines Corporation System and method for supporting transactions for a thin client lacking a persistent store in a distributed object-oriented environment
GB2328044B (en) * 1997-08-01 2002-02-27 Ibm Apparatus,method and computer program product for client/server computing with a transaction representation located on each transactionally involved server
JP4311059B2 (en) * 2003-03-26 2009-08-12 株式会社日立製作所 Transaction control method
CN101046815A (en) * 2007-03-14 2007-10-03 华为技术有限公司 Affairs coordinator, resource using end, service end and distribution affairs process method

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008110115A1 (en) * 2007-03-14 2008-09-18 Huawei Technologies Co., Ltd. Transaction coordinator, resource using terminal, service terminal, and method of distributed transaction processing
CN102541847A (en) * 2010-12-08 2012-07-04 金蝶软件(中国)有限公司 Method and device for loading resource files, and ERP (Enterprise Resource Planning) system
CN102347986A (en) * 2011-10-17 2012-02-08 百度在线网络技术(北京)有限公司 Multi-transaction synchronized cooperation management method, system and device thereof
CN102347986B (en) * 2011-10-17 2014-10-22 百度在线网络技术(北京)有限公司 Multi-transaction synchronized cooperation management method, system and device thereof
WO2015062113A1 (en) * 2013-10-29 2015-05-07 华为技术有限公司 Affair processing method and device
US9348841B2 (en) 2013-10-29 2016-05-24 Huawei Technologies Co., Ltd. Transaction processing method and system
US10055445B2 (en) 2013-10-29 2018-08-21 Huawei Technologies Co., Ltd. Transaction processing method and apparatus
CN107045453A (en) * 2016-02-05 2017-08-15 慧与发展有限责任合伙企业 Two-phase commitment protocol for distributed transaction is mixed
CN106571958A (en) * 2016-11-02 2017-04-19 新智数字科技有限公司 Method and device for building communication connection with SAP system
CN107016029A (en) * 2016-12-13 2017-08-04 阿里巴巴集团控股有限公司 A kind of processing method of business datum, apparatus and system
CN107329809A (en) * 2017-07-05 2017-11-07 国网信息通信产业集团有限公司 A kind of distributed transaction processing method and system towards multi-data source
CN107329809B (en) * 2017-07-05 2020-11-27 国网信息通信产业集团有限公司 Distributed transaction processing method and system for multiple data sources
CN107528912A (en) * 2017-09-11 2017-12-29 金蝶软件(中国)有限公司 A kind of automatic method, system and relevant apparatus for realizing distributing real time system
CN108491252A (en) * 2018-03-13 2018-09-04 万惠投资管理有限公司 distributed transaction processing method and distributed system
CN108491252B (en) * 2018-03-13 2022-03-22 万惠投资管理有限公司 Distributed transaction processing method and distributed system
CN114422398A (en) * 2021-12-28 2022-04-29 中国电信股份有限公司 Transaction node abnormity identification system, method and device
CN114422398B (en) * 2021-12-28 2024-05-14 中国电信股份有限公司 Transaction node abnormality recognition system, method and device

Also Published As

Publication number Publication date
WO2008110115A1 (en) 2008-09-18

Similar Documents

Publication Publication Date Title
CN101046815A (en) Affairs coordinator, resource using end, service end and distribution affairs process method
CN1134741C (en) Network system, printer and information storage media
CN1967485A (en) Method and system for realizing J2EE application
CN100337235C (en) Method and apparatus for accessing database
CN1881978A (en) Application management system, application management method, server, and communication system
CN1836213A (en) Automatic and dynamic provisioning of databases
CN1298503A (en) Dynamic lookup service in a distributed system
CN101034990A (en) Right management method and device
CN1260090A (en) Data caching on the internet
CN1913442A (en) Method and system for providing service to user
CN1716249A (en) System and method for delayed fetching of designated members of a user defined type
CN101079784A (en) Internet resource searching method and its searching system
CN101031886A (en) Network system, management computer, cluster management method, and computer program
CN101052040A (en) Network interoperation system based on virtual layer and plug-in part technology
CN1805345A (en) Web service work flow processor
CN1881976A (en) Methods and apparatus for agreement-based automated service provisioning
CN1949206A (en) Information communication method and apparatus of multiprocessor system
CN1258704C (en) Method for using synergic multiple computer engines based on gridding environment
CN1798031A (en) Transaction processing system and transaction method for Web service
CN1822596A (en) Data processing method in customer/server frame
CN1889045A (en) Cocurrent event processing device and method in multi-task software system
CN1267830C (en) Network system, information processor and information storage media
CN1874559A (en) Method for building, modifying, updating personal information for handset user through network server
CN1259623C (en) Structure method of five-hierarchical system structure base on J2EE
CN1474297A (en) Organization and maintenance method based on GIS for computer network map

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Open date: 20071003