Uploaded image for project: 'Torque'
  1. Torque
  2. TORQUE-195

Remove autocommit handling from Transaction management

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.3, 3.3.1
    • 4.0-beta1
    • Runtime
    • None

    Description

      Currently, transaction handling is very unclean.

      • Transaction.beginOptional sets autocommit to false on a connection under certain conditions, but Transaction.commit() does not know what autocommit was beforehand and sets it to true under certain conditions, regardless of the connection state before
      • The field Criteria.useTransaction can be used to disable the autocommit switching when starting a transaction (but not the switching back)

      Autocommit should be handled by the connection pool, not by the OR Mapper, and should be removed from the Torque code. This would lead to the following modifications

      • remove the Transaction.beginOptional method
      • remove the useTransaction field from Criteria
        If an explicit transaction handling is desired, this can still be done by doing the connection/transaction handling in application code and using the methods which take a transaction.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            tfischer Thomas Fox
            tfischer Thomas Fox
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment