openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwsut...@apache.org
Subject svn commit: r1299042 - in /openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence: AnnotationPersistenceMetaDataParser.java XMLPersistenceMetaDataParser.java
Date Fri, 09 Mar 2012 21:02:19 GMT
Author: kwsutter
Date: Fri Mar  9 21:02:18 2012
New Revision: 1299042

URL: http://svn.apache.org/viewvc?rev=1299042&view=rev
Log:
OPENJPA-2152.  Don't submit and process an extra query hint if the desired LockModeType is
NONE (the default).

Modified:
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java?rev=1299042&r1=1299041&r2=1299042&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java
Fri Mar  9 21:02:18 2012
@@ -1871,7 +1871,7 @@ public class AnnotationPersistenceMetaDa
             for (QueryHint hint : query.hints())
                 meta.addHint(hint.name(), hint.value());
             LockModeType lmt = processNamedQueryLockModeType(query);
-            if (lmt != null) {
+            if (lmt != null && lmt != LockModeType.NONE) {
                 meta.addHint("openjpa.FetchPlan.ReadLockMode", lmt);
             }
 

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java?rev=1299042&r1=1299041&r2=1299042&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java
Fri Mar  9 21:02:18 2012
@@ -1849,7 +1849,7 @@ public class XMLPersistenceMetaDataParse
         meta.setQueryString(attrs.getValue("query"));
         String lockModeStr = attrs.getValue("lock-mode");
         LockModeType lmt = processNamedQueryLockModeType(log, lockModeStr, name);
-        if (lmt != null) {
+        if (lmt != null && lmt != LockModeType.NONE) {
             meta.addHint("openjpa.FetchPlan.ReadLockMode", lmt);
         }
         Locator locator = getLocation().getLocator();



Mime
View raw message