aspose file tools
The moose likes Threads and Synchronization and the fly likes Locking the file access Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Threads and Synchronization
Reply Bookmark "Locking the file access" Watch "Locking the file access" New topic
Author

Locking the file access

SiriVennela Arepalli
Greenhorn

Joined: Mar 08, 2004
Posts: 1
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 .
raimondas zemaitis
Ranch Hand

Joined: Feb 23, 2001
Posts: 104
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Locking the file access
 
Similar Threads
Error loading *.bin file
Checking common files for password protection
cant deploy an EAR to JBoss 5.1.0GA
JNI-load dll
ANT VSSGET Task