修正jdbc 3.0 driver的bug

git-svn-id: http://code.alibabatech.com/svn/druid/trunk@324 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
wenshao
2011-06-30 05:38:18 +00:00
parent 2a405eb2a7
commit 58a95cdfee
2 changed files with 148 additions and 0 deletions
@@ -39,6 +39,7 @@ public final class PoolableResultSet extends PoolableWrapper implements ResultSe
private final ResultSet rs;
private final PoolableStatement stmt;
private boolean closed = false;
public PoolableResultSet(PoolableStatement stmt, ResultSet rs){
this.stmt = stmt;
@@ -70,6 +71,7 @@ public final class PoolableResultSet extends PoolableWrapper implements ResultSe
public void close() throws SQLException {
try {
rs.close();
this.closed = true;
} catch (Throwable t) {
throw checkException(t);
}
@@ -1359,6 +1361,10 @@ public final class PoolableResultSet extends PoolableWrapper implements ResultSe
@Override
public boolean isClosed() throws SQLException {
if (this.closed) {
return true;
}
try {
return rs.isClosed();
} catch (Throwable t) {