Don't worry about "maintenance" issues, it's very stable, I've used it for years in heavy-load concurrent applications. I've even derived a specific version (as the licence allows this) to use faster implementations of HashMap etc (Trove4J), and (using IntelliJ IDEA) refactored the package to be more similar to the Java 5 package and class name structure. Hey, I even fixed the bugs in the Javadoc (thanks again IDEA for flagging them up).
In this package and the Java 5 package, there's "ReadWriteLock", "FutureResult", and thread pools. These are the key elements (IMHO). ReadWriteLock is better than "synchronized" in that it allows concurrent reading but guaranteed exclusive write access, and (if you're brave) you can enable such transactional behaviour starting in one method and stopping in another. FutureResult might be really useful for everything "asynchronous" planned for HttpClient 4, and the thread pools can avoid reinventing the wheel. It also allows easier migration if ever HttpClient becomes a JDK 1.5+ only library. Tip: don't have multiple lock objects for a given class, otherwise you can still hit some interesting deadlocks.
- Chris
From: Tarun Ramakrishna <[EMAIL PROTECTED]> Reply-To: Tarun Ramakrishna <[EMAIL PROTECTED]> To: HttpClient Project <[email protected]> Subject: Re: [POLL] Minimal JRE requirement for HttpClient 4.0 Date: Fri, 21 Jan 2005 16:46:45 +0530
> For concurrency, you can use Doug Lea's util.concurrent package, which is
> what Java 5's equivalent is based on.
>
> http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html
From Doug Lea's page: http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html , it states "Note: Upon release of J2SE 5.0, this package enters maintenance mode: Only essential corrections will be released. J2SE5 package java.util.concurrent includes improved, more efficient, standardized versions of the main components in this package. Please plan to convert your applications to use them."
:-) Tarun.
_________________________________________________________________
MSN Messenger : dialoguez en temps r�el avec vos amis ! http://g.msn.fr/FR1001/866
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
