openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ritika Maheshwari" <ritikams...@gmail.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:14:22 GMT
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-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);
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message