Hi,
If one wants to configure ProxoolDataSource, specifies user and password
tags, and leaves delegateProperties tag empty, the user and password are
not used due to the below source code:
private synchronized void registerPool() throws ProxoolException {
if (!ConnectionPoolManager.getInstance().isPoolExists(alias)) {
ConnectionPoolDefinition cpd = new ConnectionPoolDefinition();
cpd.setAlias(getAlias());
cpd.setDriver(getDriver());
cpd.setFatalSqlExceptionsAsString(getFatalSqlExceptionsAsString());
cpd.setFatalSqlExceptionWrapper(getFatalSqlExceptionWrapperClass());
cpd.setHouseKeepingSleepTime(getHouseKeepingSleepTime());
cpd.setHouseKeepingTestSql(getHouseKeepingTestSql());
cpd.setMaximumActiveTime(getMaximumActiveTime());
cpd.setMaximumConnectionCount(getMaximumConnectionCount());
cpd.setMaximumConnectionLifetime(getMaximumConnectionLifetime());
cpd.setMinimumConnectionCount(getMinimumConnectionCount());
cpd.setOverloadWithoutRefusalLifetime(getOverloadWithoutRefusalLifetime());
cpd.setPassword(getPassword());
cpd.setPrototypeCount(getPrototypeCount());
cpd.setRecentlyStartedThreshold(getRecentlyStartedThreshold());
cpd.setSimultaneousBuildThrottle(getSimultaneousBuildThrottle());
cpd.setStatistics(getStatistics());
cpd.setStatisticsLogLevel(getStatisticsLogLevel());
cpd.setTrace(isTrace());
cpd.setUrl(getDriverUrl());
cpd.setUser(getUser());
cpd.setVerbose(isVerbose());
cpd.setJmx(isJmx());
cpd.setJmxAgentId(getJmxAgentId());
cpd.setTestAfterUse(isTestAfterUse());
cpd.setTestBeforeUse(isTestBeforeUse());
cpd.setDelegateProperties(delegateProperties);
ProxoolFacade.registerConnectionPool(cpd);
}
}
As you can see, cpd.setDelegateProperties(delegateProperties);
is called *after* the cpd.setUser(getUser()); and
cpd.setPassword(getPassword());.
setUser in turn adds a property entry in the delegateProperties.
So, when the delegateProperties tag is left empty, the user and password
set via the user and password tags are cleared because delegateProperties
are set to null.
Until the bug is corrected, in order for the current setup to work, the
users have to specify bogus info in the setup and password tags (because
empty tags cause an exception) and supply the real user and password
information in the delegateProperties tag.
Regards,
Bulent Erdemir
Bill Horsman
Proxool Driver
None
Public
|
Date: 2007-05-15 23:11
|
| Field | Old Value | Date | By |
|---|---|---|---|
| status_id | Open | 2007-05-15 23:11 | billhorsman |
| resolution_id | None | 2007-05-15 23:11 | billhorsman |
| assigned_to | nobody | 2007-05-15 23:11 | billhorsman |
| close_date | - | 2007-05-15 23:11 | billhorsman |
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use