i have a functionality to implement for which I am thinking about using FutureTask and callable calsses.just want to verify if I can use this and if it is correct to use these classes in such situations. Here it is : I am working on a web application with struts spring hibernate. I have to upload a file of type excel/.csv/.txt containing around 40 columns/fields and around 1000 rows. I have to process each row and each field of that row. this will include following subtasks :
- getting the data from cell/field
- validation of data such as maxlenght ,required etc.
- discard the row if it does not meet specific criteria.
- creating an VO for each row and populating a VO with the data
- storing the VO.
So, I was thinking about using future task for each row processing to make it multi threaded. Proble m I am facing is how to wait till all the tasks are completed as I wnat to send the response with the final results. It is just that I want to make the processing faster and not the actual response time.