I\'ve been trying to use FileLock to get exclusive access to a file in order to:
FileLock
The lock you've for is locking a region inside a file, but not the file itself, so while region is locked you can't delete or rename the file.
You may want to look at the Commons Transaction project.