mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
修正连接池不能正确被回收的问题
git-svn-id: http://code.alibabatech.com/svn/druid/trunk@537 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
@@ -683,12 +683,12 @@ public abstract class DruidAbstractDataSource implements DruidAbstractDataSource
|
||||
}
|
||||
|
||||
public void setProxyFilters(List<Filter> filters) {
|
||||
this.filters = filters;
|
||||
if (filters != null) {
|
||||
this.filters.addAll(filters);
|
||||
}
|
||||
}
|
||||
|
||||
public void setFilters(String filters) throws SQLException {
|
||||
this.filters.clear();
|
||||
|
||||
if (filters == null || filters.length() == 0) {
|
||||
return;
|
||||
}
|
||||
@@ -820,6 +820,7 @@ public abstract class DruidAbstractDataSource implements DruidAbstractDataSource
|
||||
private final AtomicLong connectionIdSeed = new AtomicLong(10000);
|
||||
private final AtomicLong statementIdSeed = new AtomicLong(20000);
|
||||
private final AtomicLong resultSetIdSeed = new AtomicLong(50000);
|
||||
private final AtomicLong transactionIdSeed = new AtomicLong(50000);
|
||||
|
||||
public long createConnectionId() {
|
||||
return connectionIdSeed.incrementAndGet();
|
||||
@@ -832,6 +833,11 @@ public abstract class DruidAbstractDataSource implements DruidAbstractDataSource
|
||||
public long createResultSetId() {
|
||||
return resultSetIdSeed.getAndIncrement();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long createTransactionId() {
|
||||
return transactionIdSeed.getAndIncrement();
|
||||
}
|
||||
|
||||
void initStatement(Statement stmt) throws SQLException {
|
||||
if (queryTimeout > 0) {
|
||||
|
||||
Reference in New Issue
Block a user