pool.setTestOnReturn(getPerUserTestOnReturn(username));
pool.setTestWhileIdle(getPerUserTestWhileIdle(username));
pool.setTimeBetweenEvictionRunsMillis(
getPerUserTimeBetweenEvictionRunsMillis(username));
pool.setSwallowedExceptionListener(new SwallowedExceptionLogger(log));
Object old = managers.put(getPoolKey(username), factory);
if (old != null) {
throw new IllegalStateException("Pool already contains an entry for this user/password: " + username);
}