Thread Pooling Design Question
Hi -
I am new to java and i have a task to complete using ThreadPooling. I am using JDK1.4 so i have decided to use the api provided by Doug Lea.
Basically i will have to process around 20000 documents daily which are in the database and each document has an ID associated and there is no dependency on each document. They can be processed independently.
I thought of using PooledExecutor to create a ThreadPool of lets say 5 and give the 4000 documents for each Thread to process them.
My confusion is how do i give 4000 documents to each thread making sure the same documents are not picked up by the other thread and will each thread return back to the pool after the task is done.
Should i use FutureResult object for these?
Any thoughts are really appreciated.

