| Author |
I am failed, Please help
|
bin zao
Greenhorn
Joined: Feb 26, 2007
Posts: 2
|
|
Hi I am failed. Here is my result. The maximum possible score is 400; the minimum to pass is 320. General Considerations (maximum = 100): 100 Documentation (maximum = 70): 70 O-O Design (maximum = 30): 30 GUI (maximum = 40): 24 Locking (maximum = 80): 0 Data store (maximum = 40): 40 Network server (maximum = 40): 40 Major point loss for record-locking mechanism, which is not according to spec. Your locking code does not block when trying to lock a locked record. -------------------------------------------------------------------- So before I submitted my assignment, I tested my locking mechanism, it did work. I don know where is wrong in my locking mechanism. Could Andrew or anyone help me to find out where is the problem, so I want resubmit my assignment again. Can I upload my Data class here? Thanks for your help.
|
 |
Khaled Mahmoud
Ranch Hand
Joined: Jul 15, 2006
Posts: 360
|
|
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 ]
|
SCJP, SCJD,SCWCD,SCDJWS,SCEA 5 MCP-C#, MCP-ASP.NET - http://www.khaledinho.com/
Life is the biggest school
|
 |
Barry Gaunt
Ranch Hand
Joined: Aug 03, 2002
Posts: 7729
|
|
Can I upload my Data class here?
No - but you can post your locking method (repeat: only the locking method).
|
Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
|
 |
bin zao
Greenhorn
Joined: Feb 26, 2007
Posts: 2
|
|
Hi Bartender and Ranch hand Thanks for your suggestions, I know now where is wrong in my code. I did following mistake: A Client locked record 1. B Client try to lock record 1. B Client can not lock record 1 and get the Message: "record 1 is already used by other client", then B Client does not wait until A Client unlocks the record 1 and B Client finishes the operation. This is the mistake. So, I will improve my assignment and post my new "lock", "islock" and "unlock" methods here before I resubmit it. If you could check my new locking mechanism, it would be grateful. Thanks
|
 |
Barry Gaunt
Ranch Hand
Joined: Aug 03, 2002
Posts: 7729
|
|
|
The rules of the forum (see FAQ) is that you can post only one locking method. So I suggest you post only your lock method.
|
 |
 |
|
|
subject: I am failed, Please help
|
|
|