Author: shawkins
Date: 2010-09-16 14:11:10 -0400 (Thu, 16 Sep 2010)
New Revision: 2584
Modified:
branches/7.1.x/runtime/src/main/java/org/teiid/odbc/ODBCServerRemoteImpl.java
branches/7.1.x/runtime/src/main/java/org/teiid/transport/PgBackendProtocol.java
Log:
TEIID-139 adding basic support for transaction statements from jdbc and removing mm
references
Modified: branches/7.1.x/runtime/src/main/java/org/teiid/odbc/ODBCServerRemoteImpl.java
===================================================================
---
branches/7.1.x/runtime/src/main/java/org/teiid/odbc/ODBCServerRemoteImpl.java 2010-09-16
17:29:21 UTC (rev 2583)
+++
branches/7.1.x/runtime/src/main/java/org/teiid/odbc/ODBCServerRemoteImpl.java 2010-09-16
18:11:10 UTC (rev 2584)
@@ -223,6 +223,7 @@
Prepared previous = this.preparedMap.get(prepareName);
if (previous == null) {
this.client.errorOccurred(RuntimePlugin.Util.getString("bad_binding",
prepareName)); //$NON-NLS-1$
+ return;
}
if (bindName == null || bindName.length() == 0) {
@@ -357,11 +358,8 @@
}
else if ((m = rollbackPattern.matcher(modified)).matches()) {
try {
- if (!this.connection.getAutoCommit()) {
- this.connection.rollback();
- this.connection.setAutoCommit(true);
- modified = "SELECT 'ROLLBACK'"; //$NON-NLS-1$
- }
+ this.connection.rollback(false);
+ modified = "SELECT 'ROLLBACK'"; //$NON-NLS-1$
} catch (SQLException e) {
this.client.errorOccurred(e);
}
@@ -416,7 +414,9 @@
break;
} finally {
try {
- stmt.close();
+ if (stmt != null) {
+ stmt.close();
+ }
} catch (SQLException e) {
this.client.errorOccurred(e);
break;
Modified: branches/7.1.x/runtime/src/main/java/org/teiid/transport/PgBackendProtocol.java
===================================================================
---
branches/7.1.x/runtime/src/main/java/org/teiid/transport/PgBackendProtocol.java 2010-09-16
17:29:21 UTC (rev 2583)
+++
branches/7.1.x/runtime/src/main/java/org/teiid/transport/PgBackendProtocol.java 2010-09-16
18:11:10 UTC (rev 2584)
@@ -107,7 +107,7 @@
throw e.getCause();
}
} catch (Throwable e) {
- // TODO: handle this.
+ terminate(e);
}
}
Show replies by date