[hibernate-issues] [Hibernate-JIRA] Issue Comment Edited: (HHH-4784) JDBCTransaction -> commit() -> notifyLocalSynchsBeforeTransactionCompletion()

Silvan Eugen Lincan (JIRA) noreply at atlassian.com
Tue Apr 6 11:14:02 EDT 2010


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

Silvan Eugen Lincan edited comment on HHH-4784 at 4/6/10 10:12 AM:
-------------------------------------------------------------------

A proposal patch for this HHH-4784 which is duplicate of HHH-3543.
The patch is against the sources from http://anonsvn.jboss.org/repos/hibernate/core/tags/hibernate-3.5.0-Final

      was (Author: slincan):
    A proposal patch for this HHH-4784 which is duplicate of HHH-3543
  
> 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-Final
>
>         Attachments: Patch_proposal_for_JIRA_HHH-4784_which_is_linked_to_HHH-3543.patch
>
>
> 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