mirror of https://github.com/apache/openjpa.git
OPENJPA-2570: Allow an informix user the option to disable the RETAINUPDATELOCKS sql
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1672487 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ad6d7fea70
commit
a4ae8a61e1
|
@ -324,19 +324,21 @@ public class InformixDictionary
|
|||
|
||||
// if we haven't already done so, initialize the lock mode of the
|
||||
// connection
|
||||
if (_seenConnections.add(conn)) {
|
||||
if (lockModeEnabled) {
|
||||
String sql = "SET LOCK MODE TO WAIT";
|
||||
if (lockWaitSeconds > 0)
|
||||
sql = sql + " " + lockWaitSeconds;
|
||||
execute(sql, conn, true);
|
||||
synchronized(_seenConnections) {
|
||||
if (_seenConnections.add(conn)) {
|
||||
if (lockModeEnabled) {
|
||||
String sql = "SET LOCK MODE TO WAIT";
|
||||
if (lockWaitSeconds > 0)
|
||||
sql = sql + " " + lockWaitSeconds;
|
||||
execute(sql, conn, true);
|
||||
}
|
||||
|
||||
if (!disableRetainUpdateLocksSQL){
|
||||
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
|
||||
// each connection
|
||||
|
|
Loading…
Reference in New Issue