openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fay Wang (JIRA)" <j...@apache.org>
Subject [jira] Closed: (OPENJPA-1608) PESSIMISTIC_WRITE is not working in Informix
Date Mon, 05 Apr 2010 16:02:27 GMT

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

Fay Wang closed OPENJPA-1608.
-----------------------------


> PESSIMISTIC_WRITE is not working in Informix
> --------------------------------------------
>
>                 Key: OPENJPA-1608
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1608
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 2.0.0, 2.1.0
>            Reporter: Fay Wang
>            Assignee: Fay Wang
>             Fix For: 2.1.0
>
>         Attachments: OPENJPA-1608.patch
>
>
> The following call:
> 	district = em.find(DistrictJPA.class, key, LockModeType.PESSIMISTIC_WRITE);
> 	generates SELECT ... FOR UPDATE .
> 	However, in the default isolation level (read committed). Informix does not lock the
row, causing a lot of duplicate key errors. The work around is for the application to explicitly
set the property below in the persistence.xml:
> 	<property name="openjpa.jdbc.TransactionIsolation" value="repeatable-read" />
> 	According to the spec 3.4.4, footnote:
> 	For example, a persistence provider may use an underlying database platform's SELECT
FOR UPDATE statements to implement pessimistic locking if that construct provides appropriate
semantics, or the provider may use an isolation level of repeatable read.
> 	It appears that the persistence provider must implements PESSIMISTIC_WRITE semantics
transparently to the application. 

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


Mime
View raw message