This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Threads and Synchronization and the fly likes Backport vs apache commons pool Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "Backport vs apache commons pool" Watch "Backport vs apache commons pool" New topic
Author

Backport vs apache commons pool

Dorothy Taylor
Ranch Hand

Joined: Nov 26, 2007
Posts: 104
Hi

I want to do thread pooling in jdk 1.4. I found that thread pooling can be done using backport util or apache commons v1.5. Could anyone please advise how these two are different so which one can I use

Thanks
Jelle Klap
Bartender

Joined: Mar 10, 2008
Posts: 1787
    
    7

They both provide thread pool implementations that work, so which one would be better suited depends on your requirements. I don't have any experience usingThe JSR 166 backport on older Java versions, but it seems like a pretty good option. In theory, if you ever upgrade to Java 5 or later you could simply search/replace the package names in your source files, as the backport API's shoud be compatible with the Java 5 and later java.util.concurrent classes. You also get a lot of the rather nifty concurrency utilities, besides ThreadPoolExecutor / ScheduledThreadPoolExecutor, and that's a nice benefit as well.


Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
 
wood burning stoves
 
subject: Backport vs apache commons pool