openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey" <plins...@bea.com>
Subject RE: svn commit: r526212 - in /incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc: kernel/JDBCFetchConfigurationImpl.java sql/DBDictionary.java
Date Fri, 06 Apr 2007 17:17:37 GMT
Yes -- see my more recent commit. It should resolve this issue.

Once you guys get some unit tests in place for this, and we have DB2
coverage in our checkin tests, this type of thing shouldn't happen.

Does Derby provide the same support? IIRC, Derby shares quite a bit of
DB2 syntax; maybe you could change the DerbyDictionary (extends
AbstractDB2Dictionary) to do the same thing, in which case we'll be able
to unit test this stuff without any new database resources.

-Patrick

-- 
Patrick Linskey
BEA Systems, Inc. 

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it. 

> -----Original Message-----
> From: Ritika Maheshwari [mailto:ritikamster@gmail.com] 
> Sent: Friday, April 06, 2007 10:14 AM
> 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
> 
> 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 <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-j
dbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCFetchConfigurationI
mpl.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-j
dbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java?view=dif
f&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);
> >
> >
> >
> 

Notice:  This email message, together with any attachments, may contain information  of  BEA
Systems,  Inc.,  its subsidiaries  and  affiliated entities,  that may be confidential,  proprietary,
 copyrighted  and/or legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient, and have received
this message in error, please immediately return this by email and then delete it.

Mime
View raw message