Hi,
I've a fairly general question regarding the use of RandomAccessFile in the context of my SCJD assignment.
Currently, each of my clients has it's own RandomAccessFile object to access the datafile.
To update a record, my business logic executes like this:
lock();
update();
unlock();
My locking implementation prevents more than one client updating the same
record at the same time.
However, more than one client may update different records at the same time.
Is this valid?
Can two or more clients write to different parts of the datafile concurrently?
I'ld appreciate any views people might have.
Thanks.
I've a fairly general question regarding the use of RandomAccessFile in the context of my SCJD assignment.
Currently, each of my clients has it's own RandomAccessFile object to access the datafile.
To update a record, my business logic executes like this:
lock();
update();
unlock();
My locking implementation prevents more than one client updating the same
record at the same time.
However, more than one client may update different records at the same time.
Is this valid?
Can two or more clients write to different parts of the datafile concurrently?
I'ld appreciate any views people might have.
Thanks.