SCJP 1.4 (93%)<br />SCJD (In progress. It can run, but it can't hide...)
SCJP 1.4 (93%)<br />SCJD (In progress. It can run, but it can't hide...)
SCJP 1.4 (93%)<br />SCJD (In progress. It can run, but it can't hide...)
SCJP 1.4 (93%)<br />SCJD (In progress. It can run, but it can't hide...)
SCJP 1.4 (93%)<br />SCJD (In progress. It can run, but it can't hide...)
I mean the assignment spec does not say..."You have to use the lock() and unlock() methods in the interface for ALL your locking needs".
SCJP 1.4 (93%)<br />SCJD (In progress. It can run, but it can't hide...)
What about the case where create() wants to reuse a deleted record?
Surely then you would want to lock the deleted record first, to make sure that two clients aren't both trying to reuse the deleted record?
SCJP 1.4 (93%)<br />SCJD (In progress. It can run, but it can't hide...)
Ok...client calls createRecord().
createRecord calls lock ( on a deleted record) > insert data > mark as UNdeleted > unlock.
But..according to the spec...lock on a deleted record should throw recordnotfoundexception.
Originally posted by Jar Jaquiso:
Hello Simon,
About locking and creating a record, in my specs it has no sense as the lock method takes a record ID to be locked. This means it is not a database lock, it is a record lock.
So, when creating a new record the client does NOT have to previously use the lock method, as there is still no record to be locked, thus no problem in the create method.
The lock of the deleted record in order to reuse it is internal, the client knows nothing about reused records.
![]()
Jar
[ November 06, 2006: Message edited by: Jar Jaquiso ]
[ November 06, 2006: Message edited by: Jar Jaquiso ]
SCJP<br />SCJD
What about the case where create() wants to reuse a deleted record?
_ _ ________________________ _ _ <br /> <br />Just SCJP (but 93%)