Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

file locking in Java

Status
Not open for further replies.

WhiteSox

Programmer
May 22, 2001
20
0
0
US
<B>System:</B>
Linux

<B>Question:</B>
how to do file locking stuff?

<B>What I have done:</B>
Synchronizing all objects that will be operating files.

any suggestion?
 
You can also try creating a lock file that processes look for before attempting access to the file.

When a process is done using the real file, it deletes the lock file. You need to handle the case in which a(the) process crashes and doesn't delete the lockfile though.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top