You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by wi...@apache.org on 2007/04/03 22:24:39 UTC
svn commit: r525262 -
/incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java
Author: wisneskid
Date: Tue Apr 3 13:24:39 2007
New Revision: 525262
URL: http://svn.apache.org/viewvc?view=rev&rev=525262
Log:
fix to OPENJPA-182 commit
Modified:
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java
Modified: incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java?view=diff&rev=525262&r1=525261&r2=525262
==============================================================================
--- incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java (original)
+++ incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java Tue Apr 3 13:24:39 2007
@@ -45,6 +45,8 @@
private static final String useKeepUpdateLockClause= "USE AND KEEP UPDATE LOCKS";
private static final String useKeepExclusiveLockClause="USE AND KEEP EXCLUSIVE LOCKS";
private static final String forReadOnlyClause = "FOR READ ONLY";
+ public static final String UPDATE_HINT = "openjpa.hint.updateClause";
+ public static final String ISOLATION_HINT = "openjpa.hint.isolationLevel";
public DB2Dictionary() {
platform = "DB2";
validationSQL = "SELECT DISTINCT(CURRENT TIMESTAMP) FROM "
@@ -234,20 +236,20 @@
try {
// Determine the update clause/isolationLevel the hint
// overrides the persistence.xml value
- if (fetch != null && fetch.getHint("openjpa.hint.updateClause")
+ if (fetch != null && fetch.getHint(UPDATE_HINT)
!=null )
updateClause = ((Boolean)fetch.
- getHint("openjpa.hint.updateClause")).booleanValue();
+ getHint(UPDATE_HINT)).booleanValue();
else
updateClause = forUpdate;
- if (fetch != null &&fetch.getHint("openjpa.hint.isolationLevel")
+ if (fetch != null &&fetch.getHint(ISOLATION_HINT)
!=null )
isolationLevel = (String)fetch.
- getHint("openjpa.hint.isolationLevel");
+ getHint(ISOLATION_HINT);
else
isolationLevel = conf.getTransactionIsolation();
if (updateClause == false)
- //This sql is not for update so add FOR Read Only clause
+ // This sql is not for update so add FOR Read Only clause
forUpdateString.append(" ").append(forReadOnlyClause)
.append(" ");
else if (updateClause == true){