On 5/7/06, Phil Steitz <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to