openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hthom...@apache.org
Subject svn commit: r1666314 - in /openjpa/trunk: ./ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/InformixDictionary.java
Date Thu, 12 Mar 2015 21:40:37 GMT
Author: hthomann
Date: Thu Mar 12 21:40:37 2015
New Revision: 1666314

URL: http://svn.apache.org/r1666314
Log:
OPENJPA-2570: Allow an Informix user the option to disable the 'RETAINUPDATELOCKS' SQL.

Modified:
    openjpa/trunk/   (props changed)
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/InformixDictionary.java

Propchange: openjpa/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Mar 12 21:40:37 2015
@@ -2,5 +2,5 @@
 /openjpa/branches/2.0.x:1504611
 /openjpa/branches/2.1.x:1415379,1415398,1485010,1513249,1517838,1530146,1533218,1533280,1539188,1569528,1575444,1591536,1636464,1655218,1662610
 /openjpa/branches/2.2.1.x:1415367,1415413,1415425,1504719,1508186,1530347,1533222,1539193,1651808
-/openjpa/branches/2.2.x:1384400,1415459-1415460,1415469,1485013,1530364,1533223,1580898,1580939,1591681,1631786
+/openjpa/branches/2.2.x:1384400,1415459-1415460,1415469,1485013,1530364,1533223,1580898,1580939,1591681,1631786,1666312
 /openjpa/branches/2.3.x:1533462,1535560,1564121

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/InformixDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/InformixDictionary.java?rev=1666314&r1=1666313&r2=1666314&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/InformixDictionary.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/InformixDictionary.java
Thu Mar 12 21:40:37 2015
@@ -85,6 +85,8 @@ public class InformixDictionary
     private final Collection _seenConnections = new ReferenceHashSet
         (ReferenceHashSet.WEAK);
 
+    public boolean disableRetainUpdateLocksSQL=false;
+
     private static final Localizer _loc = Localizer.forPackage
         (InformixDictionary.class);
 
@@ -329,8 +331,11 @@ public class InformixDictionary
                     sql = sql + " " + lockWaitSeconds;
                 execute(sql, conn, true);
             }
-            String sql = "SET ENVIRONMENT RETAINUPDATELOCKS 'ALL'";
-            execute(sql, conn, false);
+            
+            if (!disableRetainUpdateLocksSQL){
+                String sql = "SET ENVIRONMENT RETAINUPDATELOCKS 'ALL'";
+                execute(sql, conn, false);
+            }
         }
 
         // the datadirect driver requires that we issue a rollback before using



Mime
View raw message