commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz" <>
Subject [dbcp] A little design help please re DBCP-100
Date Mon, 07 Aug 2006 04:43:51 GMT
As stated in the bug report:

"SharedPoolDataSource.getPooledConnectionAndInfo() is synchronized _instance_
method, but it accesses SharedPoolDataSource.userKeys which is a _static_
variable, so if you have more than one instance of SharedPoolDataSource (as we
do) access to the map would not be properly synchronized. So either map should
be made instance variable, or the method should be synchronized on the class,
not instance."

I would very much appreciate comments on the options to fix this,
including "WONTFIX", but I don't like that option.  I have coded the
change to synchronize the method on the class (or more precisely, to
make its body synchronized on the class, since it can't be static),
but am hesitant to make that change.  Any better ideas?  Any
recollections / rationale for why the map is static?



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message