Movatterモバイル変換


[0]ホーム

URL:


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
CN101046815ACNA2007100644121ACN200710064412ACN101046815ACN 101046815 ACN101046815 ACN 101046815ACN A2007100644121 ACNA2007100644121 ACN A2007100644121ACN 200710064412 ACN200710064412 ACN 200710064412ACN 101046815 ACN101046815 ACN 101046815A
Authority
CN
China
Prior art keywords
transaction
request
affairs
resource
adapter
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 LtdfiledCriticalHuawei Technologies Co Ltd
Priority to CNA2007100644121ApriorityCriticalpatent/CN101046815A/en
Publication of CN101046815ApublicationCriticalpatent/CN101046815A/en
Priority to PCT/CN2008/070471prioritypatent/WO2008110115A1/en
Pendinglegal-statusCriticalCurrent

Links

Images

Classifications

Landscapes

Abstract

Translated fromChinese

本发明涉及事务协调器,事务资源使用端、服务端以及事务资源使用端、服务端处理分布式事务的方法。使用端对事务资源客户端进行注册;通过注册的事务资源客户端提交提交请求;注销事务资源客户端。服务端根据业务操作请求中携带的事务标识查找对应的事务适配器;将当前事务替换为所述事务适配器;;执行业务操作;将资源管理器注册到事务标识对应的事务适配器;根据提交请求中携带的事务标识将所述提交请求转发至相应的事务适配器,通过注册的资源管理器执行提交。本发明实施例实现了基于非JCA的事务统一,接口简单,满足基于J2EE、J2SE的应用系统以及基于C++、C#等的非Java应用系统的数据操作一致性需求,并实现了跨事务管理器的事务统一。

Figure 200710064412

The invention relates to a transaction coordinator, a transaction resource user end, a server end, and a method for processing distributed affairs by the transaction resource use end and the server end. The user registers the transaction resource client; submits the submission request through the registered transaction resource client; cancels the transaction resource client. The server searches for the corresponding transaction adapter according to the transaction identifier carried in the business operation request; replaces the current transaction with the transaction adapter; executes the business operation; registers the resource manager with the transaction adapter corresponding to the transaction identifier; The transaction identifier forwards the commit request to the corresponding transaction adapter, and executes the commit through the registered resource manager. The embodiment of the present invention realizes the unification of affairs based on non-JCA, the interface is simple, satisfies the data operation consistency requirement of the application system based on J2EE, J2SE and the non-Java application system based on C++, C#, etc., and realizes cross-transaction manager Unification of affairs.

Figure 200710064412

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 transactionresource use side 1 uses the transaction resource service end to provide by transaction resource client 12.Transactionresource use side 1 comprisesaffairs coordinator 11,transaction resource client 12, businessoperation request module 13 and submitsrequest module 14 to.
Affairs coordinator 11 is used for the coordinate transactions resource and carries out distributed transaction control, and transactionresource use side 1 is byaffairs 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 transactionresource 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.Businessoperation request module 13 is used for submitting the business operation request that carries Transaction Identifier to bytransaction resource client 12, and business operation comprises increasing, delete, change, looking into of data and message issue etc.After eachtransaction resource client 12 receives the business operation request, be registered in the affairs coordinator 11.Submit to requestmodule 14 to be used for initiating to submit to request, this module will submit to request to be sent toaffairs coordinator 11, andaffairs coordinator 11 sends the request of submitting to by thetransaction resource client 12 of registration to transactionresource service end 2.
When affairs relate to a plurality of transaction resource client, the order of the operations that businessoperation request module 13 can comprise according to affairs sends the business operation request one by one to each correspondingtransaction resource client 12 of operation, each transaction resource client receives business operation request post-registration inaffairs coordinator 11, thus but a plurality of transaction resources ofaffairs 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.Transactionresource 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 comprisesaffairs mapping block 21,explorer 22,task manager 23 and transactionadapter creation module 24.
Affairs mapping block 21 is used to search the transaction adapter of Transaction Identifier correspondence, and thisaffairs mapping block 21 comprisestransaction 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, eachtransaction adapter 211 is used for the operation of affairs of management transactionresource service end 2 participations, when transactionresource 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 thetransaction adapter 211 of Transaction Identifiercorrespondence.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 commitmentprotocol.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.Transactionadapter creation module 24 is used to createtransaction adapter 211, after transactionresource service end 2 receives the business operation request, if do not find the Transaction Identifier correspondent transaction adapter, then createtransaction adapter 211, andtransaction adapter 211 and corresponding Transaction Identifier are saved to loggingmodle 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, transactionresource use side 1 is connected with transactionresource service system 2 bytransaction resource client 12 from this figure, andtransaction resource client 12 is corresponding one by one with transactionresource service system 2.
As shown in Figure 4, be embodiment of the invention affairs coordinator first structuralrepresentation.Affairs coordinator 11 comprisesRegistering modules 112, submitsrequest forwarding module 113 to,nullifies module 114 andtransaction proxy module 115.
Registering modules 112 is used to register thetransaction resource client 12 that participates in current affairs, and notifiestransaction proxy module 115 with log-on message.Transaction resource client 12 is registered to Registeringmodules 112 as Resource Broker.After submitting to requestforwarding module 113 to receive the submission request of submittingrequest 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 thetransaction resource client 12 of Resource Broker registration, it submits the submission request that carries Transaction Identifier to bytransaction resource client 12, and supports to submit this submission request to two stage ways of submission.Nullifymodule 114 and be used for after submitting request to, thetransaction resource client 12 of current affairs being nullified, and notifytransaction 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 comprisecreation module 111, and this module is used to createtransaction 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 withaffairs coordinator 11 shown in Figure 5, andtransaction proxy module 115 specifically comprisespreparation request module 1151 andoperation 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 thataffairs mapping block 21 has further added removingmodule 214, andtask manager 23 comprises that specificallyaffairs handover module 231,resource registering module 232 and resource nullifymodule 233.
Affairs handover module 231 is used for after receiving the business operation request, current affairs are replaced with thetransaction adapter 211 of Transaction Identifier correspondence by the affairs oftask manager 23, and after carrying out submission, current affairs are replaced with the affairs oftask manager 23 bytransaction adapter 211.
Theexplorer 22 thatresource registering module 232 is used for participating in these affairs is registered to thetransaction adapter 211 of Transaction Identifier correspondence, therebytransaction adapter 211 can be forwarded to the submission request that receivescorresponding explorer 22.
Resource is nullifiedmodule 233 and is used for after carrying outsubmission explorer 22 being nullified fromtransaction adapter 211.
The removingmodule 213 ofaffairs mapping block 21 is used for after carry out submitting to, thetransaction 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.
CNA2007100644121A2007-03-142007-03-14Affairs coordinator, resource using end, service end and distribution affairs process methodPendingCN101046815A (en)

Priority Applications (2)

Application NumberPriority DateFiling DateTitle
CNA2007100644121ACN101046815A (en)2007-03-142007-03-14Affairs coordinator, resource using end, service end and distribution affairs process method
PCT/CN2008/070471WO2008110115A1 (en)2007-03-142008-03-11Transaction coordinator, resource using terminal, service terminal, and method of distributed transaction processing

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CNA2007100644121ACN101046815A (en)2007-03-142007-03-14Affairs coordinator, resource using end, service end and distribution affairs process method

Publications (1)

Publication NumberPublication Date
CN101046815Atrue CN101046815A (en)2007-10-03

Family

ID=38771431

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CNA2007100644121APendingCN101046815A (en)2007-03-142007-03-14Affairs coordinator, resource using end, service end and distribution affairs process method

Country Status (2)

CountryLink
CN (1)CN101046815A (en)
WO (1)WO2008110115A1 (en)

Cited By (13)

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

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102306197B (en)*2011-09-222013-07-03用友软件股份有限公司Device and method for guaranteeing consistency of data-source-crossing operation results
CN113760519B (en)*2020-06-072024-07-26北京金山云网络技术有限公司Distributed transaction processing method, device, system and electronic equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US5920863A (en)*1997-05-311999-07-06International Business Machines CorporationSystem and method for supporting transactions for a thin client lacking a persistent store in a distributed object-oriented environment
GB2328044B (en)*1997-08-012002-02-27IbmApparatus,method and computer program product for client/server computing with a transaction representation located on each transactionally involved server
JP4311059B2 (en)*2003-03-262009-08-12株式会社日立製作所 Transaction control method
CN101046815A (en)*2007-03-142007-10-03华为技术有限公司Affairs coordinator, resource using end, service end and distribution affairs process method

Cited By (19)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
WO2008110115A1 (en)*2007-03-142008-09-18Huawei Technologies Co., Ltd.Transaction coordinator, resource using terminal, service terminal, and method of distributed transaction processing
CN102541847A (en)*2010-12-082012-07-04金蝶软件(中国)有限公司Method and device for loading resource files, and ERP (Enterprise Resource Planning) system
CN102347986A (en)*2011-10-172012-02-08百度在线网络技术(北京)有限公司Multi-transaction synchronized cooperation management method, system and device thereof
CN102347986B (en)*2011-10-172014-10-22百度在线网络技术(北京)有限公司Multi-transaction synchronized cooperation management method, system and device thereof
WO2015062113A1 (en)*2013-10-292015-05-07华为技术有限公司Affair processing method and device
US9348841B2 (en)2013-10-292016-05-24Huawei Technologies Co., Ltd.Transaction processing method and system
US10055445B2 (en)2013-10-292018-08-21Huawei Technologies Co., Ltd.Transaction processing method and apparatus
CN107045453A (en)*2016-02-052017-08-15慧与发展有限责任合伙企业Two-phase commitment protocol for distributed transaction is mixed
CN106571958A (en)*2016-11-022017-04-19新智数字科技有限公司Method and device for building communication connection with SAP system
CN107016029A (en)*2016-12-132017-08-04阿里巴巴集团控股有限公司A kind of processing method of business datum, apparatus and system
CN107329809A (en)*2017-07-052017-11-07国网信息通信产业集团有限公司A kind of distributed transaction processing method and system towards multi-data source
CN107329809B (en)*2017-07-052020-11-27国网信息通信产业集团有限公司 A distributed transaction processing method and system for multiple data sources
CN107528912A (en)*2017-09-112017-12-29金蝶软件(中国)有限公司A kind of automatic method, system and relevant apparatus for realizing distributing real time system
CN108491252A (en)*2018-03-132018-09-04万惠投资管理有限公司distributed transaction processing method and distributed system
CN108491252B (en)*2018-03-132022-03-22万惠投资管理有限公司Distributed transaction processing method and distributed system
CN115203215A (en)*2021-04-082022-10-18腾讯科技(深圳)有限公司 Data processing method and device, storage medium and electronic device
CN114422398A (en)*2021-12-282022-04-29中国电信股份有限公司Transaction node abnormity identification system, method and device
CN114422398B (en)*2021-12-282024-05-14中国电信股份有限公司Transaction node abnormality recognition system, method and device
CN114880081A (en)*2022-05-202022-08-09中国银行股份有限公司Distributed transaction management system

Also Published As

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

Similar Documents

PublicationPublication DateTitle
CN101046815A (en)Affairs coordinator, resource using end, service end and distribution affairs process method
CN1143220C (en)A duplicated naming service in a distributed processing system
CN1134741C (en) Network systems and printers
CN1214580C (en) Data Cache on the Internet
CN101052040A (en)Network interoperation system based on virtual layer and plug-in part technology
CN1967485A (en)Method and system for realizing J2EE application
CN1881978A (en)Application management system, application management method, server, and communication system
CN1359495A (en)Smart stub or enterprise Java TM bean in a distributed processing system
CN1520123A (en)Answering method to address inquire and program and appts. thereof, and address notifying method, program and appts.
CN1298503A (en)Dynamic lookup service in a distributed system
CN1836213A (en)Automatic and dynamic provisioning of databases
CN101038635A (en)System for controlling flow process authority of task stream management system and implement method thereof
CN101065729A (en)A method for ensuring the quality of a service in a distributed computing environment
CN1901547A (en)Method and apparatus for making web service policy agreement
CN106547567A (en)Interprocess communication system and its implementation under multi-service in a kind of Android system
CN101079736A (en)Modeled network resource positioning method
CN1612567A (en)System for providing services for applications available under different protocols
CN1822596A (en)Data processing method in customer/server frame
CN1716249A (en)System and method for delayed fetching of designated members of a user defined type
CN1913442A (en)Method and system for providing service to user
CN1208299A (en)Communication device, communication method and medium on which computer program for carrying out method is recorded
CN1878206A (en)Event subscription method and system
CN1148651C (en) Methods of Controlling Moving Objects
CN1299200C (en)Unified converting method for interface data in telecommunication network management system and its system
CN1924801A (en)Solid mass-based software framework system and running method thereof

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
C12Rejection of a patent application after its publication
RJ01Rejection of invention patent application after publication

Open date:20071003


[8]ページ先頭

©2009-2025 Movatter.jp