FileLock on file accessed from multiple virtual machines
posted 7 years ago
I have a web service that allows a file to be uploaded. The web service can be deployed on multiple machines, but the file is to be stored within the same file system. Can I use java.nio.channels.FileLock and Filechannels to lock a file when it gets created so that no other upload will try and save the same file?