Hello bin zao,
Your locking code does not block when trying to lock a locked record
Here is what they mean :
Client A locks a Record 1. Client B tries to lock record 1 (The same record
locked by Client A),Client B should wait till record 1 is unlocked.To be more specific, the
Thread of Client B should wait till Record 1 is unlocked.This should be done by using the wait and notify mechanism.
Hope that his helps.
[ February 26, 2007: Message edited by: Khaled Mahmoud ]