You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Nikita Timofeev (JIRA)" <ji...@apache.org> on 2017/08/23 15:27:00 UTC
[jira] [Updated] (CAY-2354) DbGenerator.runGenerator must commit
its connection
[ https://issues.apache.org/jira/browse/CAY-2354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nikita Timofeev updated CAY-2354:
---------------------------------
Fix Version/s: 4.1.M1
4.0.B1
> DbGenerator.runGenerator must commit its connection
> ---------------------------------------------------
>
> Key: CAY-2354
> URL: https://issues.apache.org/jira/browse/CAY-2354
> Project: Cayenne
> Issue Type: Bug
> Reporter: Andrus Adamchik
> Assignee: Nikita Timofeev
> Fix For: 4.0.B1, 4.1.M1
>
>
> 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
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)