// Get the maximum number of connections allowed.
try {
maxConnections =
getInt(properties, POOL_MAX_CONNECTIONS_PROPERTY, 10);
} catch (NumberFormatException nfe) {
throw new JDBCRepositoryException(EXCEPTION_LOCALIZER.format(
"jdbc-pool-invalid-max-connections"));
}
// Get the maximum number of free connections allowed.
try {
maxFreeConnections = getInt(properties,
POOL_MAX_FREE_CONNECTIONS_PROPERTY,
8);
} catch (NumberFormatException nfe) {
throw new JDBCRepositoryException(EXCEPTION_LOCALIZER.format(
"jdbc-pool-invalid-maxFree-connections"));
}
// Get the minimum number of free connections allowed.
try {
minFreeConnections = getInt(properties,
POOL_MIN_FREE_CONNECTIONS_PROPERTY,
2);
} catch (NumberFormatException nfe) {
throw new JDBCRepositoryException(EXCEPTION_LOCALIZER.format(
"jdbc-pool-invalid-minFree-connections"));
}
// Get the initial number of free connections created.
try {
initialConnections = getInt(properties,
POOL_INITIAL_CONNECTIONS_PROPERTY,
minFreeConnections);
} catch (NumberFormatException nfe) {
throw new JDBCRepositoryException(EXCEPTION_LOCALIZER.format(
"jdbc-pool-invalid-initial-connections"));
}
boolean keepConnectionsAlive = getKeepConnectionsAlive(properties);
int connectionPollInterval = getConnectionPollInterval(properties);