2013年12月18日星期三

Rollback and things have not submitted and differences ?

Operate the database with things , I do not commit and rollback if there is any difference ? Memory influential?
------ Solution ---------------------------------------- ----
reason for the rollback is to prevent the submission process dao access exception occurs , the rollback is the case of databases level.

but do not submit , they are fundamentally impossible to deal with the database.
------ Solution ---------------------------------------- ----
simply do not submit without any operation , but the rollback is because some of the problems encountered in the course of things, submission, cancel the operation just performed , this difference is quite obvious , lz do not know is it really do not understand ah
------ Solution --------------------------------- -----------
simply do not submit without any operation , but the rollback is because some of the problems encountered in the course of things, submission, cancel the operation just performed .
rollback may have previously had some database insert delete update , a rollback will return to the past , do not submit it did not insert delete update.
------ Solution ---------------------------------------- ----
under the same conditions of the transaction , rollback and not commit the same performance
but also some differences

transaction is to operate the event to the database ( simulation ) runs until commit operation, which makes the modification actually produce results, you can be seen as uncommitted transactions are conducted in a temporary library
rollback for the same transaction , if an error has occurred , then cancel the temporary library operations, does not affect the actual data

The main difference is that , if you do not roll back these temporary operation will continue until the end of this one connection so far , that is, although you can not see , but the operation of the temporary library still exists, but the rollback is effective immediately , are actually rolled back , just not the same point in time
------ For reference only ------------------------- --------------
ask you this question too tangled it. The Submission of the rollback rollback. Do not submit , then dry it basically corresponds to nothing and you did not care what it has to reinvent the wheel is essentially what the difference in my humble
------ For reference only ----- ----------------------------------
commit and rollback look
---- - For reference only ---------------------------------------
submitted , Description Affairs successful, if not successful before the transaction , consider a rollback , in line with atomic transactions , either all succeed or all- unsuccessful
------ For reference only -------- -------------------------------


If you set the transaction manually submit then you do not commit the transaction , then you operate a long useful? Is not the equivalent of what you do not do, it means you do not operate the database operation . rollback is to ensure data synchronization , if a step problems, you certainly can not rollback the data completely to ensure consistent , it can do it , especially in relatively good safety items ( for example: banks aspects of the project ) .
------ For reference only -------------------------------------- -
in the same transaction , the failure to submit the equivalent of rollback
------ For reference only ---------------------- -----------------

did not succeed on the rollback ? But if you do not succeed I will not submit , what are their differences?
------ For reference only -------------------------------------- -

did not succeed at the time I did not submit not? Why should rollback , but not directly manipulate the database ? Do not roll the operation of the temporary table will not release in memory ?
------ For reference only -------------------------------------- -

Thank you, brother , it seems that the ability to express bad , that you understand it . They did not commit and rollback difference memory is it? Temporary Operation of things which can not commit and rollback quick release garbage ? There are examples of things that look online after setAutoCommit set false, submit complete operating mode default setting things again become true, then there is no other operations , and I was wondering, do they program on a Connection? Or is this other use ?
------ For reference only -------------------------------------- -

Austria , understand , thank you enlighten me
------ For reference only ----------------------- ----------------

Austria, understand. Thank
------ For reference only ------------------------------------- -


Thank you brother
------ For reference only -------------------------------- -------


+ +1
------ For reference only ------------------------------- --------
  The reply was deleted at the moderator 2012-06-08 09:50:04

------ For reference only ---------------------------------- -----
taught today suddenly encountered this problem

没有评论:

发表评论