A method and apparatus for interacting data with a database
An interactive data and database technology, applied in the computer field, can solve the problems of reducing the ability of the system to process transactions and the low ability of the system to process transactions, and achieve the effect of reducing the locking time and guaranteeing the ability
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
no. 1 example
[0130] From attached figure 2 In the normal submission process, it can be seen that for a transaction involving two XA resources, a transaction needs to interact with each XA resource at least 4 times from start to completion, namely voting, agreeing to submit, submitting and submitting to complete.
[0131] If a non-XA resource is allowed to participate in the transaction, the transaction commit operation of the non-XA resource is placed between the phase 1 and phase 2 of the XA resource transaction commit, which can not only ensure the consistency of the data, but also ensure that the resources participating in the transaction are relatively When it is small, the performance of the transaction is greatly improved.
[0132] That is to say, the number of local XA resources participating in the transaction in the global transaction is greater than 1, and the number of remote branches participating in the transaction in the global transaction is 0. The calling phase includes th...
no. 2 example
[0161] For a transaction that only one XA resource participates in, you can directly use one-phase commit to commit the transaction, reducing the number of interactions between the transaction manager and the XA resource.
[0162] That is to say, the number of local XA resources participating in the transaction in the global transaction is 1, and the number of remote branches participating in the transaction in the global transaction is 0, and the calling phase includes phase 1.
[0163] (1) Divide atomic operations
[0164] Figure 8 It is a schematic diagram of atomic division in the second embodiment of the present invention. Use XAResource.start and XAResource.end to partition atomic work on the only XA resource participating in the transaction.
[0165] (2) Existing commit / rollback transactions
[0166] Figure 9 It is a schematic diagram of transaction submission in the prior art. When a transaction needs to be committed, first call XAResource.prepare to vote on the...
no. 3 example
[0174] For global transactions with remote branches participating in the transaction, when committing the transaction, it is necessary to call XAResource.papare of all XA resources participating in the transaction initiator to collect the results. If all XA resources participating in the transaction initiator return XAResource.XA_COMMIT, it is necessary to continue to let all XAResources participating in the branch count the statistical results of calling XAResource.prepare, if the XAResource participating in all branches of the transaction calls XAResource. prepare returns XAResource.XA_COMMIT, then the remote branch can commit the transaction. After the remote branch successfully submits the XA transaction, the local branch submits the XA transaction again.
[0175] Specifically, the number of local XA resources participating in the transaction in the global transaction is greater than or equal to 1, and the number of remote branches participating in the transaction in the g...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


