mirror of https://github.com/apache/openjpa.git
OPENJPA-1608: the RetainUpdateLock is not supported for IDS 11.10. Other parts of 1608 were already merged in. Merging in from trunk r932643 by Fay.
git-svn-id: https://svn.apache.org/repos/asf/openjpa/branches/2.0.x@932660 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
88e3da61c3
commit
3736c1bc06
|
@ -321,10 +321,10 @@ public class InformixDictionary
|
|||
String sql = "SET LOCK MODE TO WAIT";
|
||||
if (lockWaitSeconds > 0)
|
||||
sql = sql + " " + lockWaitSeconds;
|
||||
execute(sql, conn);
|
||||
execute(sql, conn, true);
|
||||
}
|
||||
String sql = "SET ENVIRONMENT RETAINUPDATELOCKS 'ALL'";
|
||||
execute(sql, conn);
|
||||
execute(sql, conn, false);
|
||||
}
|
||||
|
||||
// the datadirect driver requires that we issue a rollback before using
|
||||
|
@ -337,13 +337,18 @@ public class InformixDictionary
|
|||
return conn;
|
||||
}
|
||||
|
||||
private void execute(String sql, Connection conn) {
|
||||
private void execute(String sql, Connection conn, boolean throwExc) {
|
||||
Statement stmnt = null;
|
||||
try {
|
||||
stmnt = conn.createStatement();
|
||||
stmnt.executeUpdate(sql);
|
||||
} catch (SQLException se) {
|
||||
throw SQLExceptions.getStore(se, this);
|
||||
if (throwExc)
|
||||
throw SQLExceptions.getStore(se, this);
|
||||
else {
|
||||
if (log.isTraceEnabled())
|
||||
log.trace(_loc.get("can-not-execute", sql));
|
||||
}
|
||||
} finally {
|
||||
if (stmnt != null)
|
||||
try {
|
||||
|
|
|
@ -207,3 +207,5 @@ unknown-delim-support: Unable to determine whether delimited identifiers are sup
|
|||
can_not_get_current_schema: Unable to get current schema. SQLException message is "{0}".
|
||||
cannot-determine-identifier-base-case: Unable to determine the case to use for \
|
||||
identifiers. The default value of "{0}" will be used.
|
||||
can-not-execute: Unable to execute {0}.
|
||||
|
||||
|
|
Loading…
Reference in New Issue