On Thu, 1 Dec 2005, Jess Holle wrote: | Has anyone tried replacing the synchronization in log4j with Java 5 locks to | and done any benchmarks? | | I'm curious as I think it would be interesting to have a lock factory which | produces something like the existing locks for pre-Java-5 JVMs and Java 5 | locks in Java 5. | | We purely use and require Java 5 and higher for all new development at this | point, which may make us unusual, but that's where we're at. I understand the | need to support earlier JVMs, but am interested in squeezing the best possible | performance and scalability out under Java 5.
My opinion: Server-side programs and in particular libraries don't always have the opportunity to _decide_ the infrastructure, one important pice of which is the JRE version. What about Doug Lea's "concurrency.jar", which basically _is_ the JSR 166? This works with 1.2+, and most also "should" work with 1.1 (1.2 is "collections") http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html Other elements of concurrency.jar worth examining for the ones of you that are heavily into the innards of log4j, are possibly: ConcurrentHashMap ConcurrentReaderHashMap ReadWriteLock and obviously Sync and Mutex possibly along with CondVar Regards, Endre. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
