Howto synchronize file access in a shared folder using Java (OR: ReadWriteLock on network level)
问题 I have multiple applications running in one virtual machine. I have multiple virtual machines running on one server. And I have multiple servers. They all share a file using a shared folder on linux. The file is read and written by all applications. During the write process no application is allowed to read this file. The same for writing: If an application is reading the file no application is allowed to write it. How do I manage to synchronize the applications so they will wait for the