|
|
|
@ -77,7 +77,7 @@ abstract class PoolBase
|
|
|
|
|
initializeDataSource();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getPoolName()
|
|
|
|
|
String getPoolName()
|
|
|
|
|
{
|
|
|
|
|
return poolName;
|
|
|
|
|
}
|
|
|
|
@ -88,7 +88,7 @@ abstract class PoolBase
|
|
|
|
|
// JDBC methods
|
|
|
|
|
// ***********************************************************************
|
|
|
|
|
|
|
|
|
|
public void quietlyCloseConnection(final Connection connection, final String closureReason)
|
|
|
|
|
void quietlyCloseConnection(final Connection connection, final String closureReason)
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
if (connection == null || connection.isClosed()) {
|
|
|
|
@ -109,7 +109,7 @@ abstract class PoolBase
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public boolean isConnectionAlive(final Connection connection)
|
|
|
|
|
boolean isConnectionAlive(final Connection connection)
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
final long validationTimeout = config.getValidationTimeout();
|
|
|
|
@ -143,17 +143,16 @@ abstract class PoolBase
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public DataSource getUnwrappedDataSource()
|
|
|
|
|
Throwable getLastConnectionFailure()
|
|
|
|
|
{
|
|
|
|
|
return dataSource;
|
|
|
|
|
return lastConnectionFailure.getAndSet(null);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Throwable getLastConnectionFailure()
|
|
|
|
|
public DataSource getUnwrappedDataSource()
|
|
|
|
|
{
|
|
|
|
|
return lastConnectionFailure.getAndSet(null);
|
|
|
|
|
return dataSource;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ***********************************************************************
|
|
|
|
|
// PoolEntry methods
|
|
|
|
|
// ***********************************************************************
|
|
|
|
@ -163,7 +162,7 @@ abstract class PoolBase
|
|
|
|
|
return new PoolEntry(newConnection(), this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void resetConnectionState(final Connection connection, final ProxyConnection proxyConnection, final int dirtyBits) throws SQLException
|
|
|
|
|
void resetConnectionState(final Connection connection, final ProxyConnection proxyConnection, final int dirtyBits) throws SQLException
|
|
|
|
|
{
|
|
|
|
|
int resetBits = 0;
|
|
|
|
|
|
|
|
|
@ -200,9 +199,15 @@ abstract class PoolBase
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void shutdownNetworkTimeoutExecutor()
|
|
|
|
|
{
|
|
|
|
|
if (netTimeoutExecutor != null && netTimeoutExecutor instanceof ThreadPoolExecutor) {
|
|
|
|
|
((ThreadPoolExecutor) netTimeoutExecutor).shutdownNow();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ***********************************************************************
|
|
|
|
|
// PoolMediator methods
|
|
|
|
|
// JMX methods
|
|
|
|
|
// ***********************************************************************
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -258,13 +263,6 @@ abstract class PoolBase
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void shutdownNetworkTimeoutExecutor()
|
|
|
|
|
{
|
|
|
|
|
if (netTimeoutExecutor != null && netTimeoutExecutor instanceof ThreadPoolExecutor) {
|
|
|
|
|
((ThreadPoolExecutor) netTimeoutExecutor).shutdownNow();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ***********************************************************************
|
|
|
|
|
// Private methods
|
|
|
|
|
// ***********************************************************************
|
|
|
|
|