mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
restart support 'properties' parameter
This commit is contained in:
@@ -570,6 +570,10 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat
|
||||
}
|
||||
|
||||
public void restart() throws SQLException {
|
||||
this.restart(null);
|
||||
}
|
||||
|
||||
public void restart(Properties properties) throws SQLException {
|
||||
lock.lock();
|
||||
try {
|
||||
if (activeCount > 0) {
|
||||
@@ -584,6 +588,10 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat
|
||||
this.inited = false;
|
||||
this.enable = true;
|
||||
this.closed = false;
|
||||
|
||||
if (properties != null) {
|
||||
configFromPropety(properties);
|
||||
}
|
||||
} finally {
|
||||
lock.unlock();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user