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) { public JDBCFetchConfiguration setIsolationLevel(int level) {
if (level != -1 if (level != -1 && level != DEFAULT
&& level != Connection.TRANSACTION_NONE && level != Connection.TRANSACTION_NONE
&& level != Connection.TRANSACTION_READ_UNCOMMITTED && level != Connection.TRANSACTION_READ_UNCOMMITTED
&& level != Connection.TRANSACTION_READ_COMMITTED && level != Connection.TRANSACTION_READ_COMMITTED
@ -336,6 +336,9 @@ public class JDBCFetchConfigurationImpl
throw new IllegalArgumentException( throw new IllegalArgumentException(
_loc.get("bad-level", Integer.valueOf(level)).getMessage()); _loc.get("bad-level", Integer.valueOf(level)).getMessage());
if (level == DEFAULT)
_state.isolationLevel = -1;
else
_state.isolationLevel = level; _state.isolationLevel = level;
return this; return this;
} }

View File

@ -2205,8 +2205,8 @@ public class DBDictionary
if (forUpdate && !simulateLocking) { if (forUpdate && !simulateLocking) {
assertSupport(supportsSelectForUpdate, "SupportsSelectForUpdate"); assertSupport(supportsSelectForUpdate, "SupportsSelectForUpdate");
if (this.forUpdateClause != null) if (forUpdateClause != null)
buf.append(" ").append(this.forUpdateClause); buf.append(" ").append(forUpdateClause);
} }
if (range && rangePosition == RANGE_POST_LOCK) if (range && rangePosition == RANGE_POST_LOCK)
appendSelectRange(buf, start, end); appendSelectRange(buf, start, end);