[hibernate-issues] [Hibernate-JIRA] Resolved: (HHH-4850) regression, we are no longer throwing PessimisticLockException as required by the JPA-2 spec

Scott Marlow (JIRA) noreply at atlassian.com
Thu Jan 28 09:02:29 EST 2010


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4850?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott Marlow resolved HHH-4850.
-------------------------------

    Resolution: Won't Fix

Will not fix as the specification should be clear about which exception is expected in this case (pessimistic lock exception occurs during transaction.commit operation).  It seems that the better application technique is to code for either exception occurring. 

> regression, we are no longer throwing  PessimisticLockException as required by the JPA-2 spec
> ---------------------------------------------------------------------------------------------
>
>                 Key: HHH-4850
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4850
>             Project: Hibernate Core
>          Issue Type: Bug
>    Affects Versions: 3.5.0-Beta-3
>            Reporter: Scott Marlow
>            Assignee: Scott Marlow
>             Fix For: 3.5.0-Beta-4
>
>
> It looks like the fix for HHH-4806 caused this to regress.
> 3.4.4.2 
> "
> When an application locks an entity with LockModeType.PESSIMISTIC_READ and later updates
> that entity, the lock must be converted to an exclusive lock when the entity is flushed to the database[42].
> If the lock conversion fails, and the database locking failure results in transaction-level rollback, the
> provider must throw the PessimisticLockException and ensure that the JTA transaction or
> EntityTransaction has been marked for rollback. When the lock conversion fails, and the database lock-
> ing failure results in only statement-level rollback, the provider must throw the LockTimeoutEx-
> ception (and must not mark the transaction for rollback).
> "

-- 
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