[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4555) Support use of Envers with Auto-commit mode.
Paul Poole (JIRA)
noreply at atlassian.com
Thu Jan 19 10:51:12 EST 2012
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45177#comment-45177 ]
Paul Poole commented on HHH-4555:
---------------------------------
Steve, according to my colleague, he tried running with flush mode set to Manual and our tests passed, but nothing was audited by Envers. He tried additional flush modes, but had failures (the latter failures are more than likely a problem with how our system is architected - not sure why manual didn't work). If there is no know restriction, I will look into this myself more thoroughly and if I find an issue (with a newer release), then I will create an issue. Hopefully Adam will confirm that manual is OK - if it is, it could be some type of setup problem. Thanks.
> Support use of Envers with Auto-commit mode.
> --------------------------------------------
>
> Key: HHH-4555
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4555
> Project: Hibernate ORM
> Issue Type: New Feature
> Components: envers
> Affects Versions: 3.5.0-Beta-2
> Environment: Hibernate 3.5.0-Beta-2
> Reporter: Kevin Schmidt
> Assignee: Adam Warski
>
> Currently Envers is designed so that it synchronizes with the currently running transaction in order to know when to commit the inserts into the Audit Tables. This is an effective strategy for ensuring that the audit information is only saved to the database if the Transactional Unit of Work which caused the audit data to be created is committed.
> This design creates a limitation on Envers such that it cannot persist audit information unless there is an active transaction. This effectively disables auditing for anyone modifying data using Hibernate outside of a Hibernate Transaction. Specifically, if you are using Autocommit = True and manually flushing the Hibernate Session then you cannot have any of your data audited using Envers.
> I am not that well versed with the design of Envers but was hoping this situation could be detected and avoided. Maybe the audit information could be synchronized on the flush event rather than when a transaction is committed to the database.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list