Hello, I have 3 tier architecture. Every client receives the own instance of the Data class through ConnectionFactory. All locked records with locked cookies I saved in:
Inside the lock and unlock methods I synchronize lockedRecord.
But I am totaly lost about the update method. I will check the lockedRecords in this method, therefore I need also to syncronize lockedRecords. But what about RandomAccessFile raf? Should I also synchronize it in the update method? Or should I not synchronize the RandomAccessFile object at all to prevent from the dead-locks? My write method is also not synchronized.
Could you help me? Thanks a lot for your help! Olena