Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 4439 invoked from network); 5 Apr 2010 14:43:52 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 5 Apr 2010 14:43:52 -0000 Received: (qmail 5495 invoked by uid 500); 5 Apr 2010 14:43:51 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 5409 invoked by uid 500); 5 Apr 2010 14:43:51 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 5394 invoked by uid 99); 5 Apr 2010 14:43:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Apr 2010 14:43:50 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Apr 2010 14:43:48 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 51065234C4B3 for ; Mon, 5 Apr 2010 14:43:27 +0000 (UTC) Message-ID: <61781193.687751270478607331.JavaMail.jira@brutus.apache.org> Date: Mon, 5 Apr 2010 14:43:27 +0000 (UTC) From: "Donald Woods (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Updated: (OPENJPA-1608) PESSIMISTIC_WRITE is not working in Informix In-Reply-To: <470064947.638341270142787248.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OPENJPA-1608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Donald Woods updated OPENJPA-1608: ---------------------------------- Patch Info: [Patch Available] Affects Version/s: 2.0.0 Fix Version/s: 2.0.0 Assignee: Fay Wang > 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.0.0, 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: > > 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.