My multi threaded application processes and loads records into an ECM repository. For reconcliation purposes , I am trying to build an XML format report with the results of the processing per record, while processing is underway per thread. The method below is called from every thread wvery time its ready to append an element to the DOM with the status.
After all priocessing completes, the below method is called only once by every thread to write to the File on the file system:
The problem is that when under load, the threads just seem to hang while the transformer.transform(source, result) call keeps getting executed until there is an interrupt of some sort. I was able to examine a section of what was appended and it was status for records that had finished processing very early in the process based on my application logs. Once an interrupt is recieved , it looks like the threads recover.
Any idea whats wrong in here ? Thanks in advance for your advice - I have been stuck trying to figure out where the problem out for days! Now that I know where the problem is , I cant figure out a solution. Looking for multi threading gurus..