|
|
|
@ -602,7 +602,7 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat
|
|
|
|
|
this.connectProperties = properties; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private synchronized void createThreadChange() { |
|
|
|
|
private synchronized void doSomethingAfterCreationThreadBreak() { |
|
|
|
|
String threadName = "Druid-ConnectionPool-Create-" + System.identityHashCode(this) + this.getUrl(); |
|
|
|
|
createConnectionThread = new CreateConnectionThread(threadName); |
|
|
|
|
createConnectionThread.setStarted(false); |
|
|
|
@ -2125,7 +2125,7 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat
|
|
|
|
|
} catch (InterruptedException e) { |
|
|
|
|
lastCreateError = e; |
|
|
|
|
lastErrorTimeMillis = System.currentTimeMillis(); |
|
|
|
|
DruidDataSource.this.createThreadChange(); |
|
|
|
|
DruidDataSource.this.doSomethingAfterCreationThreadBreak(); |
|
|
|
|
break; |
|
|
|
|
} finally { |
|
|
|
|
lock.unlock(); |
|
|
|
@ -2162,7 +2162,7 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat
|
|
|
|
|
} catch (InterruptedException ignore) { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
DruidDataSource.this.createThreadChange(); |
|
|
|
|
DruidDataSource.this.doSomethingAfterCreationThreadBreak(); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} catch (RuntimeException e) { |
|
|
|
@ -2172,7 +2172,7 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat
|
|
|
|
|
} catch (Error e) { |
|
|
|
|
LOG.error("create connection error", e); |
|
|
|
|
setFailContinuous(true); |
|
|
|
|
DruidDataSource.this.createThreadChange(); |
|
|
|
|
DruidDataSource.this.doSomethingAfterCreationThreadBreak(); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|