controllato se connectionPool e usedconnection sono valorizzate
This commit is contained in:
@@ -194,7 +194,11 @@ public class BasicConnectionPool {
|
||||
// poolLock.lock();
|
||||
try {
|
||||
// Calcola il numero totale di connessioni esistenti
|
||||
int baseCount = connectionPool.get(dbName).size() + usedConnections.get(dbName).size();
|
||||
int baseCount = 0;
|
||||
if (connectionPool.get(dbName) != null && usedConnections.get(dbName) != null) {
|
||||
baseCount = connectionPool.get(dbName).size() + usedConnections.get(dbName).size();
|
||||
}
|
||||
//int baseCount = connectionPool.get(dbName).size() + usedConnections.get(dbName).size();
|
||||
int extraCount = extraConnectionCounters.get(dbName).incrementAndGet();
|
||||
|
||||
String connectionName = ExtraConnectionNamePrefix + (baseCount + extraCount);
|
||||
|
||||
Reference in New Issue
Block a user