OPENJPA-182

git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@526212 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Patrick Linskey 2007-04-06 16:08:27 +00:00
parent 1c8f82b810
commit 8ece757233
2 changed files with 8 additions and 5 deletions

View File

@ -327,7 +327,7 @@ public class JDBCFetchConfigurationImpl
}
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
@ -336,7 +336,10 @@ public class JDBCFetchConfigurationImpl
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;
}
}

View File

@ -2205,8 +2205,8 @@ public class DBDictionary
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);