Author: hthomann
Date: Thu Mar 12 21:37:26 2015
New Revision: 1666312
URL: http://svn.apache.org/r1666312
Log:
OPENJPA-2570: Allow an Informix user the option to disable the
'RETAINUPDATELOCKS' SQL.
Modified:
openjpa/branches/2.2.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/InformixDictionary.java
Modified:
openjpa/branches/2.2.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/InformixDictionary.java
URL:
http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/InformixDictionary.java?rev=1666312&r1=1666311&r2=1666312&view=diff
==============================================================================
---
openjpa/branches/2.2.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/InformixDictionary.java
(original)
+++
openjpa/branches/2.2.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/InformixDictionary.java
Thu Mar 12 21:37:26 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