commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz" <phil.ste...@gmail.com>
Subject Re: [dbcp] A little design help please re DBCP-100
Date Tue, 08 Aug 2006 06:06:01 GMT
Thanks, Stephen.  Great way to preserve compatibility while
effectively dealing with the problem.  If there are no objections, I
will make this change.

Phil

On 8/7/06, Stephen Colebourne <scolebourne@btopenworld.com> wrote:
> You might want to look at [collections] ExtendedProperties where I just
> fixed a similar issue.
>
> I made the instance methods work against a new instance variable, and
> subclasses could still alter the static one, which now acts as a default.
>
> Stephen
>
>
> Phil Steitz wrote:
> > 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?
> >
> > Thanks!
> >
> > Phil
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message