This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes I am failed, Please help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "I am failed, Please help" Watch "I am failed, Please help" New topic
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: 361
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.
 
Don't get me started about those stupid light bulbs.
 
subject: I am failed, Please help
 
Similar Threads
SCJD - B&S Finally passed. 384/400
Locking - URLy Bird
Thanks for all guys who have helped me! I passed.
Passed SCJD.
Passed SCJD with 343/400