You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Fay Wang (JIRA)" <ji...@apache.org> on 2010/11/06 00:02:43 UTC

[jira] Updated: (OPENJPA-1762) javax.persistence.lock.scope EXTENDED doesn't properly lock join tables

     [ https://issues.apache.org/jira/browse/OPENJPA-1762?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fay Wang updated OPENJPA-1762:
------------------------------

    Attachment: OPENJPA-1726-1.patch

This patch will fix the PessimisticLockManager by locking the join table.

> javax.persistence.lock.scope EXTENDED doesn't properly lock join tables
> -----------------------------------------------------------------------
>
>                 Key: OPENJPA-1762
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1762
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 2.0.1, 2.1.0
>         Environment: Derby and DB2
>            Reporter: Rick Curtis
>         Attachments: OPENJPA-1726-1.patch, OPENJPA-1762.PATCH
>
>
> I have a simple failing unit test that exercises a small portion of the javax.persistence.lock.scope=Extended property. The failing scenario is as follows:
> ManyToMany relationship between A(owner) and B.
> Em1 - Find A, no lock
> Em1 - Refresh A, PESSIMISTIC_FORCE_INCREMENT and javax.persistence.lock.scope=PessimisticLockScope.EXTENDED -- this SHOULD lock the join table for A_B
> Em2 - Find, lock B. Remove B.  should block while trying to remove from Join table.
> I will post the unit test which demonstrates the problem shortly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.