[ 
https://issues.apache.org/jira/browse/OPENJPA-2614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17364431#comment-17364431
 ] 

ASF subversion and git services commented on OPENJPA-2614:
----------------------------------------------------------

Commit c5b97348fcfcb77d1a0c00813bc4c18bf85140f7 in openjpa's branch 
refs/heads/master from Mark Struberg
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=c5b9734 ]

OPENJPA-2614 run ALTER SEQUENCE in a separate tx

Quite a lot databases force a commit on DDL changes.
For sequences we try to run an ALTER SEQUENCE to make the sequence
reflect the allocationSize. Doing this will commit all outstanding open
DB changes in Oracle and a few other databases.
We now open a new connection.


> First rollback after application start does not work under certain 
> circumstances
> --------------------------------------------------------------------------------
>
>                 Key: OPENJPA-2614
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2614
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 2.4.0
>            Reporter: Tim Gödde
>            Priority: Major
>         Attachments: jpa-test.zip
>
>
> Rollback is not complete under the following circumstances:
> 1. Entites must use a sequence generator with GenerationType.SEQUENCE
> 2. It is the first rollback after application start
> 3. You have to flush successfully during the creation of entities
> 4. The transaction is rolled back during commit because of a constraint 
> violation
> Expected result: Nothing remains in the database that is created during the 
> transaction
> Actual result: Entites created before the flush are persisted (i.e. not 
> rolled back)
> An example project is attached. It shows the described problem when executing 
> the test.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to