8. The work that use container supervises.
The two phase in learning J2EE refer general affairs, and use this kind of means, is not the office management that opens you oneself. Container optimizes a respect to had been compared nearly always in general affairs.
The work that use container supervises (CMT) the advantage that offerred two keys (if do not have container to support this,be impossible almost) : The working unit that can combine and hale clerical behavior.
If your applied process code was used explicitly,end general affairs (perhaps use Javax.jts.UserTransaction perhaps is general affairs of this locality resource even) , and the requirement in the future needs to combine module (perhaps can be the one part that code reframes) , this kind of circumstance falls to often need to change clerical code. For example, if module A began work of a database, update a database, refer general affairs subsequently, and have module B make same processing, consider to become you to try to use two afore-mentioned module in module C please, meeting Where is occurrence what circumstance? Now, module C is carrying out a logistic movement, and the work that this movement will transfer two independence actually. If module B failed in carry out, and the general affairs of module A still can be referred. This is the behavior that our place does not hope to appear. If, contrarily, module A and module B use the word of CMT, module C also can begin a CMT (pass configuration descriptor normally) , and in module A is mixed the general affairs in module B will be same of a general affairs implicit part, need to rescript complexly no longer so the job of code.
If your applied process is in same a multiresource of visit of the need in the operation, you are about to use two phase to refer general affairs. For example, if delete a message from inside JMS alignment, and be based on the record of this message newlier subsequently, at this moment, should assure this to two operations can be carried out or won't be carried out become particularly important. If a message has been deleted from inside alignment, and the system did not update the record in the database related to this message, so this kind of system is not stable. A few serious clients and commercial issue come from abhorrent condition.
We see a few clients apply a program to try to achieve the solution of themselves constantly. " cancel " is right when perhaps can passing the code that uses a program to update failure in the database the operation of alignment. We do not advocate such doing. This kind of implementation wants more original than you imagination complex much, and still have a lot of other conditions (the circumstance that the imagination breaks down suddenly in process that if use a program,executing this operation) . As the kind that replace, should use two phase to refer general affairs. If you use CMT, the resource that and be in an onefold CMT visits two phase to refer (for example JMS and most database) , webSphere will handle all intricate works. It will ensure whole routine is carried out perhaps be not carried out, include a system to break down, the database breaks down or other conditions. Actually clerical log middleman and guarantor is retaining clerical position now. When applied process visits multiresource, the necessity that how we emphasize using CMT work has not been been.
Previous 1 2 34 5 6 7 Next