Here is simplified version of my requirement
I have a java class say Processor that contains a method say bigProcess() all it does is connect to a file server, download a specified file once that is done save the file in DB and after that update some of the DB fields in different tables.
For each of the subtasks like download file, save in DB, update fields in t1 etc it uses different methods.
The processor class is invoked every 2 hours and it has to process say around 30 to 40 requests for each invocation. To improve the perfromance I am planning to span a new thread for each request (30 to 40 threads here) and each thread calls the bigProcess method.
Now my question is do I need to synchronize any of the code blocks in bigProcess() method (here I am worried about update fields methods. Some of the update methods are do lock a row like selecte f1,f2,f3 from t1 for update, sets the values for fields f1,f2 & f3 and issue commit)
NOTE : The method bigProcess() does not use any instance variables of class Processor.