[hibernate-issues] [Hibernate-JIRA] Resolved: (HHH-4784) JDBCTransaction -> commit() -> notifyLocalSynchsBeforeTransactionCompletion()
Adam Warski (JIRA)
noreply at atlassian.com
Wed Mar 10 05:43:47 EST 2010
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4784?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Adam Warski resolved HHH-4784.
------------------------------
Assignee: Adam Warski
Resolution: Duplicate
Fix Version/s: 3.5.0.Next
This is a duplicate of http://opensource.atlassian.com/projects/hibernate/browse/HHH-3543.
However, Envers will roll back the transaction if an exception occurs and the exception is logged, so I don't think this will cause any wrong data to be written. The only problem is that it may be hard to find the problem.
> JDBCTransaction -> commit() -> notifyLocalSynchsBeforeTransactionCompletion()
> -----------------------------------------------------------------------------
>
> Key: HHH-4784
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4784
> Project: Hibernate Core
> Issue Type: Bug
> Components: core
> Affects Versions: 3.5.0-Beta-2
> Environment: hibernate-distribution-3.5.0-Beta-2
> ms-sqlserver 2008
> Reporter: Silvan Eugen Lincan
> Assignee: Adam Warski
> Fix For: 3.5.0.Next
>
>
> Java class: org.hibernate.transaction.JDBCTransaction
> method: commit()
> line: 140 call to notifyLocalSynchsBeforeTransactionCompletion()
> The problem is this: method notifyLocalSynchsBeforeTransactionCompletion(), it swallows any exception that may occur at this level and permits the execution flow of commit() method to continue.
> But in this case, the hibernate session may be already corrupted, so the commit will be wrong.
> In my opinion, the method notifyLocalSynchsBeforeTransactionCompletion() should throw the exception, and on line 140 in commit() method, the call to this notifyLocalSynchsBeforeTransactionCompletion() should be surrounded also in the try{}catch(){}.
> Otherwise, any error that can occur on Synchronization, will be omitted and the transaction committed(it should be rolled back).
> I had this problem, executing the tests from envers module with the ms sqlserver 2008 database.
> The test org.hibernate.envers.test.integration.reventity.ExceptionListener crashes.
> I hope that it deserves your attention.
> Thank you very much.
--
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