mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix connection pool bug
This commit is contained in:
@@ -99,6 +99,16 @@ public class PooledConnection extends ConnectionWrapper {
|
|||||||
return this.isClosed;
|
return this.isClosed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打开连接
|
||||||
|
*
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
PooledConnection open() {
|
||||||
|
this.isClosed = false;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 销毁连接,即彻底关闭并丢弃连接
|
* 销毁连接,即彻底关闭并丢弃连接
|
||||||
*/
|
*/
|
||||||
|
@@ -86,7 +86,7 @@ public class PooledDataSource extends AbstractDataSource {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PooledConnection getConnection() throws SQLException {
|
public PooledConnection getConnection() throws SQLException {
|
||||||
return connPool.borrowObject();
|
return connPool.borrowObject().open();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user