i have a tomcat/blazeDS application in with several users write to the same xml file. while they write i want to have a file lock on that file. my first attempt was to get the filechannel of the file and establish a lock() to the file. But unfortunately there is always a OverlappingFileLockException if i try to do so cause there is always a new process for a new call to the blazeDS components.
Is there a possibility to store a FileLock within a session or a basic functionality of tomcat to lock files within a session.
Thnak you all
I solved it by using a ReentrentLock within a static class so i cannot access it while it is locked.
…