Source:
<code>public final Connection getConnection(final long hardTimeout) throws SQLException { suspendResumeLock.acquire(); final long startTime = clockSource.currentTime(); try { long timeout = hardTimeout; final MetricsContext metricsContext = (isRecordMetrics ? metricsTracker.recordConnectionRequest() : MetricsTracker.NO_CONTEXT); do { final PoolBagEntry bagEntry = connectionBag.borrow(timeout, TimeUnit.MILLISECONDS); if (bagEntry == null) { break; } final long now = clockSource.currentTime(); if (bagEntry.evicted || (clockSource.elapsedMillis(bagEntry.lastAccess, now) > ALIVE_BYPASS_WINDOW_MS && !poolElf.isConnectionAlive(bagEntry.connection, lastConnectionFailure))) { closeConnection(bagEntry, "(connection evicted or dead)"); timeout = hardTimeout - clockSource.elapsedMillis(startTime, now); } else { metricsContext.setConnectionLastOpen(bagEntry, now); metricsContext.stop(); return ProxyFactory.getProxyConnection(bagEntry, leakTask.start(bagEntry), now); } } while (timeout > 0L); } catch (InterruptedException e) { <START> throw new SQLException(poolName + " - Interrupted during connection acquisition", e); <END> } finally { suspendResumeLock.release(); } logPoolState("Timeout failure "); String sqlState = null; final Throwable originalException = lastConnectionFailure.getAndSet(null); if (originalException instanceof SQLException) { sqlState = ((SQLException) originalException).getSQLState(); } throw new SQLTimeoutException(poolName + " - Cannot acquire connection, Timeout after " + clockSource.elapsedMillis(startTime) + "ms.", sqlState, originalException); }</code><technical_language>Contrary logs, I do include pool names in exceptions</technical_language>

Target:
public final Connection getConnection(final long hardTimeout) throws SQLException { suspendResumeLock.acquire(); final long startTime = clockSource.currentTime(); try { long timeout = hardTimeout; final MetricsContext metricsContext = (isRecordMetrics ? metricsTracker.recordConnectionRequest() : MetricsTracker.NO_CONTEXT); do { final PoolBagEntry bagEntry = connectionBag.borrow(timeout, TimeUnit.MILLISECONDS); if (bagEntry == null) { break; } final long now = clockSource.currentTime(); if (bagEntry.evicted || (clockSource.elapsedMillis(bagEntry.lastAccess, now) > ALIVE_BYPASS_WINDOW_MS && !poolElf.isConnectionAlive(bagEntry.connection, lastConnectionFailure))) { closeConnection(bagEntry, "(connection evicted or dead)"); timeout = hardTimeout - clockSource.elapsedMillis(startTime, now); } else { metricsContext.setConnectionLastOpen(bagEntry, now); metricsContext.stop(); return ProxyFactory.getProxyConnection(bagEntry, leakTask.start(bagEntry), now); } } while (timeout > 0L); } catch (InterruptedException e) { throw new SQLException(poolName + " - Interrupted during connection acquisition", e); } finally { suspendResumeLock.release(); } logPoolState("Timeout failure "); String sqlState = null; final Throwable originalException = lastConnectionFailure.getAndSet(null); if (originalException instanceof SQLException) { sqlState = ((SQLException) originalException).getSQLState(); } throw new SQLTransientConnectionException(poolName + " - Connection is not available, request timed out after " + clockSource.elapsedMillis(startTime) + "ms.", sqlState, originalException); }