I have inherited a custom connector and am helping figure out a problem that occurred when my predecessor attempted to improve performance uploading assets by releagating the insertion into the DAM into a separate thread. He did this in the CheckInHandler class by handing the object of type CheckinRequest.Item returned in the list returned by getItemList(request) to a separate thread run by a thread request pool.
However when this thread attempts to perform the upload, the input stream returned by item.getContent() appears to have been truncated. This means in practice that a zero byte file gets uploaded. The problem goes away if I replace the code that sends the item to another thread to run synchronously in the CheckInHandler.
First question is what is going on? The second question is are there any suggested best practices to optimizing perofrmance of insertions. This code was added in response to compaints that the Adobe applications (such as Illustrator) froze for a prolonged period when uploading assets to the DAM.
Thanks for any help.
Europe, Middle East and Africa