From users-return-10567-apmail-openjpa-users-archive=openjpa.apache.org@openjpa.apache.org Wed Jan 16 16:11:09 2013 Return-Path: X-Original-To: apmail-openjpa-users-archive@minotaur.apache.org Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6F96ADFBE for ; Wed, 16 Jan 2013 16:11:09 +0000 (UTC) Received: (qmail 33695 invoked by uid 500); 16 Jan 2013 16:11:09 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 33223 invoked by uid 500); 16 Jan 2013 16:11:05 -0000 Mailing-List: contact users-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@openjpa.apache.org Delivered-To: mailing list users@openjpa.apache.org Received: (qmail 33085 invoked by uid 99); 16 Jan 2013 16:11:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Jan 2013 16:11:03 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of curtisr7@gmail.com designates 209.85.219.47 as permitted sender) Received: from [209.85.219.47] (HELO mail-oa0-f47.google.com) (209.85.219.47) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Jan 2013 16:10:56 +0000 Received: by mail-oa0-f47.google.com with SMTP id h1so1597996oag.34 for ; Wed, 16 Jan 2013 08:10:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=npXV3eOHwVyIm5mia6KPKa+MqvdYj1/fyf7hROLzGMg=; b=aVmxr36vMz72RdCipV9viKTACAp7CjeZHQyWZ2+iwtmicfFB07qY/EFc8MAdZvFoeS LHUlRzFAuEQ07lOIHUQyqJ2fuCQSCchQRSeTqCfnO1RKsMmUjSmB89ByPPSZcjuKQu+5 ojxMScoAMPL/1EJMILgL5dTU5orwzqiIm3jMuXwlyxOu0S0sBw86rtJJI8CyNWdce9Ln 6sxTa94DogTiHpGcBZXBV7H+zxzQJKsUPUxZW23X4NS/66ixXXgOVe5wC1pROJ1UZbll +aslfpiKP3oRJY4XUbqflKs9R08kcnAUsTg9HVNXXRg9JjwE0E8NF/I8xDgUpzwL2LmY 4DKw== MIME-Version: 1.0 X-Received: by 10.60.12.99 with SMTP id x3mr1292908oeb.71.1358352635705; Wed, 16 Jan 2013 08:10:35 -0800 (PST) Received: by 10.60.19.130 with HTTP; Wed, 16 Jan 2013 08:10:35 -0800 (PST) In-Reply-To: References: Date: Wed, 16 Jan 2013 10:10:35 -0600 Message-ID: Subject: Re: Read Only Query From: Rick Curtis To: users@openjpa.apache.org Content-Type: multipart/alternative; boundary=e89a8ff2561054b91204d36a1e9d X-Virus-Checked: Checked by ClamAV on apache.org --e89a8ff2561054b91204d36a1e9d Content-Type: text/plain; charset=ISO-8859-1 It looks like this is an open JIRA[1] that has some changes already committed... since you're using WAS, I'd suggest going through support to see about getting an iFix. Thanks, Rick [1] https://issues.apache.org/jira/browse/OPENJPA-2235 On Wed, Jan 16, 2013 at 8:53 AM, Venkataganesh Thoppae wrote: > Environment: OpenJPA 2.1 with Websphere 7.1/DB2. > > When one user is attempting to update a table, and another user is > attempting to read the same table (with no intent to update), we are > running into OptimisticLockException. > > If the read-only user used a native query with 'FOR FETCH ONLY with UR', we > are just fine. I am looking for an option with JPA which can impart the > same behavior, so far I have found none. > > query.setReadLockMode() doesn't seem to work. > > App Server isolation level is READ COMMITTED. And our tables are > non-versioned. > > Any thoughts would be helpful > -- *Rick Curtis* --e89a8ff2561054b91204d36a1e9d--