OPENJPA-853 Informix Cursor not open problem

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@733204 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Catalina Wei 2009-01-10 00:44:36 +00:00
parent 4427455757
commit 2309a59df5
1 changed files with 9 additions and 0 deletions

View File

@ -245,6 +245,15 @@ public class InformixDictionary
public Connection decorate(Connection conn) public Connection decorate(Connection conn)
throws SQLException { throws SQLException {
conn = super.decorate(conn); conn = super.decorate(conn);
if (isJDBC3 && conn.getHoldability() !=
ResultSet.HOLD_CURSORS_OVER_COMMIT) {
conn.setHoldability(ResultSet.HOLD_CURSORS_OVER_COMMIT);
if (log.isTraceEnabled()) {
log.trace(_loc.get("connection-defaults", new Object[]{
conn.getAutoCommit(), conn.getHoldability(),
conn.getTransactionIsolation()}));
}
}
// if we haven't already done so, initialize the lock mode of the // if we haven't already done so, initialize the lock mode of the
// connection // connection