This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
This has probably been asked before but I guess locking will not be required for create(). There is really nothing to lock. However, the actual writing of the data to the database will be sychronized as such the database itself need not be "locked" --- Is this correct?
I didn't use locking with create(). I keep a list containing record numbers of deleted records. I synchronize on this list, create the record at the record number contained in the first index of the list, and if successful, remove this record number from the list of deleted record numbers. If the list of deleted records is empty, I simply add the record to the end of the file.
B.S. University of Wisconsin<br />SCJP 1.4 (85%)<br />SCJD 1.4 (92%) B&S Contractors