Donate Share

Proxool: Proxy JDBC Connection Pool

Tracker: Bugs

5 ProxoolDataSource bug - ID: 1716955
Last Update: Comment added ( billhorsman )

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


Bulent Erdemir ( bulenterdemir ) - 2007-05-11 08:06

5

Closed

Fixed

Bill Horsman

Proxool Driver

None

Public


Comment ( 1 )




Date: 2007-05-15 23:11
Sender: billhorsmanProject Admin


Bulent, you're right. I've moved the setUser and setPassword methods to
after the setDelegateProperties method. I've just committed a fix (move the
setUser and setPassword after the setDelegateProperties) to CVS so that it
can be part of 0.9.0. Thanks. Bill


Log in to comment.

Attached File

No Files Currently Attached

Changes ( 4 )

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