You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Henri Yandell <fl...@gmail.com> on 2006/05/08 19:23:19 UTC

DBCP Collections dep Was: svn commit: r404836 - /jakarta/commons/proper/dbcp/trunk/project.xml

On 5/7/06, Phil Steitz <ph...@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