You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by di...@apache.org on 2003/08/13 16:46:28 UTC
cvs commit: jakarta-commons/dbcp/src/java/org/apache/commons/dbcp DelegatingConnection.java
dirkv 2003/08/13 07:46:28
Modified: dbcp/src/java/org/apache/commons/dbcp
DelegatingConnection.java
Log:
fix some missing Delegating*Statement on the newer jdbc3 calls
Revision Changes Path
1.14 +16 -15 jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/DelegatingConnection.java
Index: DelegatingConnection.java
===================================================================
RCS file: /home/cvs/jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/DelegatingConnection.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- DelegatingConnection.java 11 Aug 2003 23:54:59 -0000 1.13
+++ DelegatingConnection.java 13 Aug 2003 14:46:28 -0000 1.14
@@ -342,8 +342,8 @@
int resultSetHoldability)
throws SQLException {
checkOpen();
- return _conn.createStatement(resultSetType, resultSetConcurrency,
- resultSetHoldability);
+ return new DelegatingStatement(this, _conn.createStatement(
+ resultSetType, resultSetConcurrency, resultSetHoldability));
}
public PreparedStatement prepareStatement(String sql, int resultSetType,
@@ -351,9 +351,8 @@
int resultSetHoldability)
throws SQLException {
checkOpen();
- return _conn.prepareStatement(sql, resultSetType,
- resultSetConcurrency,
- resultSetHoldability);
+ return new DelegatingPreparedStatement(this, _conn.prepareStatement(
+ sql, resultSetType, resultSetConcurrency, resultSetHoldability));
}
public CallableStatement prepareCall(String sql, int resultSetType,
@@ -361,27 +360,29 @@
int resultSetHoldability)
throws SQLException {
checkOpen();
- return _conn.prepareCall(sql, resultSetType,
- resultSetConcurrency,
- resultSetHoldability);
+ return new DelegatingCallableStatement(this, _conn.prepareCall(
+ sql, resultSetType, resultSetConcurrency, resultSetHoldability));
}
public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys)
throws SQLException {
checkOpen();
- return _conn.prepareStatement(sql, autoGeneratedKeys);
+ return new DelegatingPreparedStatement(this, _conn.prepareStatement(
+ sql, autoGeneratedKeys));
}
public PreparedStatement prepareStatement(String sql, int columnIndexes[])
throws SQLException {
checkOpen();
- return _conn.prepareStatement(sql, columnIndexes);
+ return new DelegatingPreparedStatement(this, _conn.prepareStatement(
+ sql, columnIndexes));
}
public PreparedStatement prepareStatement(String sql, String columnNames[])
throws SQLException {
checkOpen();
- return _conn.prepareStatement(sql, columnNames);
+ return new DelegatingPreparedStatement(this, _conn.prepareStatement(
+ sql, columnNames));
}
/* JDBC_3_ANT_KEY_END */