Reputation: 602
I have web application that generates the ODT file based on user request parameter and stored in the server as "mid.odt". After that it will be converted to Pdf and published to the user. Is there any synchronization issue will happen in here if more user will download the file with different parameter request.
Upvotes: 1
Views: 894
Reputation: 17707
Yes, there is a problem. If two different users are processing files at the same time, then both will create the same file, and only one of them will be processed. Possible outcomes are:
You should be creating each download in to a unique file. File.createTempFile()
is an option you can use, or perhaps, in Java8, use Files.createTempFile(...).
You will need to communicate to the ODT/PDF conversion process what the new file name is.
Upvotes: 2