posted 20 years ago
I just suddenly think of a question.
For the network mode, if there are 2 users on 2 different machines, connects to the same server, and perform the update task, what should I do?
According to the instructions in the assignment, this case is not mention.
Still, I think only 1 user (FCFS-based) should update the record, and the other requests are rejected. But, how should I handle this case?
Get a lock on item X, check before update, if it is already non-empty, then
throws an AlreadyBookedException?
Thanks a lot.
SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)