james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harmeet" <harm...@kodemuse.com>
Subject Re: cvs commit: jakarta-james/src/java/org/apache/james/util Lock.java
Date Mon, 06 Aug 2001 09:18:54 GMT
> I think the o.a.j.util.Lock class was based on an old Avalon Lock class.
> There are new Lock and semaphore classes in
> o.a.avalon.excalibur.concurrent which may do the trick better.

o.a.j.util.Lock is exactly the same as old Avalon Lock. Original code was a
lock map - multiple locks, each identified by a key. This was used by
Mail/Spool repository. The Lock API in Avalon changed. This caused problems
in James repositories. I had copied the old class to James to have
successful builds and allow work to continue.

At this point there does not seem to be a Lock Map equivalent in
o.a.avalon.excalibur.concurrent, but it should be easy to add.

- james.util.Lock should be renamed to james.util.LockMap. Expresses the
intent better
- james.util.LockMap should reuse the avalon.excalibur.concurrent
- if it is useful to have james.util.LockMap outside James, maybe that class
or equivalent could be added to avalon.excalibur.concurrent.

what do you say ?

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

View raw message