Return-Path: Delivered-To: apmail-incubator-open-jpa-dev-archive@locus.apache.org Received: (qmail 65534 invoked from network); 6 Apr 2007 17:14:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Apr 2007 17:14:45 -0000 Received: (qmail 42425 invoked by uid 500); 6 Apr 2007 17:14:52 -0000 Delivered-To: apmail-incubator-open-jpa-dev-archive@incubator.apache.org Received: (qmail 42300 invoked by uid 500); 6 Apr 2007 17:14:52 -0000 Mailing-List: contact open-jpa-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: open-jpa-dev@incubator.apache.org Delivered-To: mailing list open-jpa-dev@incubator.apache.org Received: (qmail 42225 invoked by uid 99); 6 Apr 2007 17:14:51 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Apr 2007 10:14:51 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of ritikamster@gmail.com designates 66.249.90.182 as permitted sender) Received: from [66.249.90.182] (HELO ik-out-1112.google.com) (66.249.90.182) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Apr 2007 10:14:43 -0700 Received: by ik-out-1112.google.com with SMTP id b32so672110ika for ; Fri, 06 Apr 2007 10:14:22 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=qKcI2D9TQqTQpDckmdvbJcq/MI0iqddL+cvDvNlxGh+xCvPPMUJOuLrYQwyM2Mk3e9IITqlywwHoipxS6emEqjYSdpo9LqqwvYxLrfFGMVhndD8hzm6qD8oZAHsDGcqX8DY39XEmBcPz6oHeUozFwfgUg4c1e6IUNqOs1Qd1dt4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=ehPw02oK2aRczhCKquSOVtuY6MUL+mRJK0Cj6tiQFjhAJ0Szz2AAtePFsSzmVbHZnR1mtYB9hUWThQoJSwu0JfylGLzKh72nunVBmXgTmQquJ3MDr5hDx+ADic1S94ZD9XZgTqIcCdV2ZlKrIgMQ4anOGWS8GBIlerLVcE0H5xM= Received: by 10.78.204.20 with SMTP id b20mr578128hug.1175879662379; Fri, 06 Apr 2007 10:14:22 -0700 (PDT) Received: by 10.78.53.4 with HTTP; Fri, 6 Apr 2007 10:14:22 -0700 (PDT) Message-ID: <7a5e6f6a0704061014x12621517j7738403280e4647d@mail.gmail.com> Date: Fri, 6 Apr 2007 10:14:22 -0700 From: "Ritika Maheshwari" To: open-jpa-dev@incubator.apache.org Subject: Re: svn commit: r526212 - in /incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc: kernel/JDBCFetchConfigurationImpl.java sql/DBDictionary.java In-Reply-To: <20070406160828.3A3791A9838@eris.apache.org> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_9043_23564454.1175879662331" References: <20070406160828.3A3791A9838@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_9043_23564454.1175879662331 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Patrick, With your recent changes regarding the OPENJPA-182 The logic has changed a little.What was intended was that if the forUpdate flag = true we append the FOR UPDATE CLAUSE.But in case of DB2 if the forUpdate flag = false then we append FOR READ ONLY clause.Now the FOR READ ONLY Clause is not getting generated.This is because you moved toOperation back to DBDictionary and there you check if (forUpdate && !simulateLocking) then append forUpdateClause.Well in this case forUpdate is false and we still want the forUpdateClause.That was the reason I had overridden the toOperation in DB2Dictionary and was just checking (!simulateLocking) before appending the forUpdate Clause. On 4/6/07, pcl@apache.org wrote: > > Author: pcl > Date: Fri Apr 6 09:08:27 2007 > New Revision: 526212 > > URL: http://svn.apache.org/viewvc?view=rev&rev=526212 > Log: > OPENJPA-182 > > Modified: > > incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCFetchConfigurationImpl.java > > incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java > > Modified: > incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCFetchConfigurationImpl.java > URL: > http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCFetchConfigurationImpl.java?view=diff&rev=526212&r1=526211&r2=526212 > > ============================================================================== > --- > incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCFetchConfigurationImpl.java > (original) > +++ > incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCFetchConfigurationImpl.java > Fri Apr 6 09:08:27 2007 > @@ -327,7 +327,7 @@ > } > > public JDBCFetchConfiguration setIsolationLevel(int level) { > - if (level != -1 > + if (level != -1 && level != DEFAULT > && level != Connection.TRANSACTION_NONE > && level != Connection.TRANSACTION_READ_UNCOMMITTED > && level != Connection.TRANSACTION_READ_COMMITTED > @@ -335,8 +335,11 @@ > && level != Connection.TRANSACTION_SERIALIZABLE) > throw new IllegalArgumentException( > _loc.get("bad-level", Integer.valueOf > (level)).getMessage()); > - > - _state.isolationLevel = level; > + > + if (level == DEFAULT) > + _state.isolationLevel = -1; > + else > + _state.isolationLevel = level; > return this; > } > } > > Modified: > incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java > URL: > http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java?view=diff&rev=526212&r1=526211&r2=526212 > > ============================================================================== > --- > incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java > (original) > +++ > incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java > Fri Apr 6 09:08:27 2007 > @@ -2205,8 +2205,8 @@ > > if (forUpdate && !simulateLocking) { > assertSupport(supportsSelectForUpdate, > "SupportsSelectForUpdate"); > - if (this.forUpdateClause != null) > - buf.append(" ").append(this.forUpdateClause); > + if (forUpdateClause != null) > + buf.append(" ").append(forUpdateClause); > } > if (range && rangePosition == RANGE_POST_LOCK) > appendSelectRange(buf, start, end); > > > ------=_Part_9043_23564454.1175879662331--