Jan 31st, 2009, 12:01 PM
A sequence of ThreadPools
I have tree different Tasks that have to be executed one after the other on the same Object.
For each of these tasks I have implemented a Runnable and I have a different ThreadPool for each of these Runnables.
RunnableA --> ThreadPoolA
RunnableB --> ThreadPoolB
RunnableC --> ThreadPoolC
After RunnableA has executed its logic it should create a RunnableB with as paramter the Object is just worked on and Schedule it with ThreadPoolB.
The same goes voor RunnableB and RunnableC/ThreadPoolC.
It would however like to use dependendency injection to make the links between the various threadpools or between the Runnable and the following threadpools. Instead of having to pass the next ThreadPool along with the current Runnable or the Object itself.
Is this possible or is there a better way of doing this all together using the spring batch framework ?