commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell" <flame...@gmail.com>
Subject DBCP Collections dep Was: svn commit: r404836 - /jakarta/commons/proper/dbcp/trunk/project.xml
Date Mon, 08 May 2006 17:23:19 GMT
On 5/7/06, Phil Steitz <phil.steitz@gmail.com> wrote:
> Are we sure we want to do this?  Will it cause problems for others who
> depend on [dbcp] now?

I don't see there being any problem with ugprading a component's
dependency version. Maven 2's transitive prowess mean that this is
something that'll come up more often.



> The only class used is LRUMap (by SharedPoolDataSource).  If we do
> make the version change, we should change the import to point to the
> non-deprecated collections class in o.a.c.c.map (instead of o.a.c.c).


> We might want to consider removing the dependency altogether by
> replacing the LRUMap with a simpler fixed size map implementation or
> eliminating it.  The LRUMap is just used as an instance cache for
> UserPassKey instances:

+1 to dropping the dependency.

> private UserPassKey getUserPassKey(String username, String password) {
>         UserPassKey key = (UserPassKey) userKeys.get(username);
>         if (key == null) {
>             key = new UserPassKey(username, password);
>             userKeys.put(username, key);
>         }
>         return key;
>     }
>
> I wonder if this really adds much with modern jvms.  The UserPassKey
> constructor is trivial.

Dumb question - but why use an LRUMap there? Do we really expect to
have so many username/password combo's that it will blow memory?

Apart from a quick glance, I've not dug into the source much. Any
reason to not just use a HashMap?

Hen

---------------------------------------------------------------------
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