Is there any way to lock restrict one process to access the file read when other process is reading the file (two processess are running simultaneously) without the use of threads or synchronization or FileLock in JDK 1.4 version .
posted 12 years ago
If you mean different processes - different JVMs then I think this is possible by introducing your custom file lock which would act like object lock, i.e. say first process creates some file (eg .lock) another process checks for presence of this file and vice versa. When access is finished lock file is removed.