openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p..@apache.org
Subject 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 16:08:28 GMT
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
View raw message