[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-5315) AuditJoinTable rows are no longer flushed to the database

Steve Ebersole (JIRA) noreply at atlassian.com
Fri Jul 16 13:10:13 EDT 2010


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=37820#action_37820 ] 

Steve Ebersole commented on HHH-5315:
-------------------------------------

As we discussed on IRC and the dev mailing list, the issue is really with Hibernate Hibernate is registering JTA syncs here.  Specifically, HEM is registering a second sync that gets called "out of turn" which causes the particular phenomena seen in this issue.  The correct solution is to register just one sync.  For 3.6 we will have a "quick and dirty" solution that works for this particular issue (see HHH-5384).  I am also thinking through longer term solutions.

> AuditJoinTable rows are no longer flushed to the database
> ---------------------------------------------------------
>
>                 Key: HHH-5315
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5315
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: envers
>    Affects Versions: 3.5.1, 3.5.2
>         Environment: JPA with extended persistence context
>            Reporter: Erik-Berndt Scheper
>            Assignee: Adam Warski
>            Priority: Minor
>             Fix For: 3.5.4, 3.6
>
>         Attachments: HHH-5315-Eclipse-project-testcase.zip, HHH-5315-envers-testcase-does-not-fail.patch, jta_compatability.txt
>
>
> In Hibernate core 3.5.1 issue HHH-3543 was fixed by using BeforeTransactionCompletionProcess instead of a transaction synchronization. I have found that since this change, rows in AuditJoinTables are no longer flushed to the database. (Envers 3.5.0 final works fine).
> I can work around the issue by adding a manual entityManager.flush() or by setting the flushmode to manual. 
> I have noticed that AuditProcess.java already executes a flush() statement, but this does not seem to suffice. I believe this is caused by the fact that during the doBeforeTransactionCompletion() extra WorkUnits are added to the hibernate ActionQueue (PersistentCollectionChangeWorkUnit) which process the AuditJoinTables.
>  

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list