Author: dwoods
Date: Sat Apr 10 01:52:35 2010
New Revision: 932660
URL: http://svn.apache.org/viewvc?rev=932660&view=rev
Log:
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.
Modified:
openjpa/branches/2.0.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/InformixDictionary.java
openjpa/branches/2.0.x/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/localizer.properties
Modified:
openjpa/branches/2.0.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/InformixDictionary.java
URL:
http://svn.apache.org/viewvc/openjpa/branches/2.0.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/InformixDictionary.java?rev=932660&r1=932659&r2=932660&view=diff
==============================================================================
---
openjpa/branches/2.0.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/InformixDictionary.java
(original)
+++
openjpa/branches/2.0.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/InformixDictionary.java
Sat Apr 10 01:52:35 2010
@@ -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 {
Modified:
openjpa/branches/2.0.x/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/localizer.properties
URL:
http://svn.apache.org/viewvc/openjpa/branches/2.0.x/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/localizer.properties?rev=932660&r1=932659&r2=932660&view=diff
==============================================================================
---
openjpa/branches/2.0.x/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/localizer.properties
(original)
+++
openjpa/branches/2.0.x/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/localizer.properties
Sat Apr 10 01:52:35 2010
@@ -207,3 +207,5 @@ unknown-delim-support: Unable to determi
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}.
+