Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-2354

DbGenerator.runGenerator must commit its connection

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0.B2, 4.1.M1
    • Component/s: None
    • Labels:
      None

      Description

      DbGenerator.runGenerator takes a DataSource as a parameter and manages its connection internally. So logically it is responsible for connection commit when the operation is finished. It doesn't do it, causing issues like [1]. The use case is when the DataSource sets autocommit to false and rolls back connections returned to the pool, hence undoing the work done by DbGenerator.

      The fix is simple (commit the connection at the end if no errors happened; rollback otherwise), but will need to be tested across all DBs.

      [1] https://github.com/bootique/bootique-cayenne/issues/44

        Attachments

          Activity

            People

            • Assignee:
              ntimofeev Nikita Timofeev
              Reporter:
              andrus Andrus Adamchik
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: