git-svn-id: http://code.alibabatech.com/svn/druid/trunk@761 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
wenshao
2011-09-15 07:50:58 +00:00
parent 59137b3e27
commit 39935b6cbb
2 changed files with 16 additions and 0 deletions
@@ -503,16 +503,26 @@ public class PoolableConnection implements PooledConnection, Connection {
// ////////////////////
@SuppressWarnings("unchecked")
@Override
public <T> T unwrap(Class<T> iface) throws SQLException {
if (conn == null) {
return null;
}
if (iface == PoolableConnection.class) {
return (T) this;
}
return conn.unwrap(iface);
}
@Override
public boolean isWrapperFor(Class<?> iface) throws SQLException {
if (iface == PoolableConnection.class) {
return true;
}
return conn.isWrapperFor(iface);
}