I got my results today:
General Considerations (maximum = 100): 95
Documentation (maximum = 70): 70
O-O Design (maximum = 30): 29
GUI (maximum = 40): 28
Locking (maximum = 80): 58
Data store (maximum = 40): 40
Network server (maximum = 40): 40
360 - 90%
Did anybody get 58 on locking?? I did quick search and I didn�t find any post containing 58 on locking. It is just very odd to me. I�m thinking that I got it because of the �overcomplicated� orphaned deadlock prevention.
If someone is interested in details of my project go ahead and ask.
Here follows the pseudo code:
In the data class I have implemented above methods in Data's lock and unlock methods and also have design a way where the Data remembers last locked record and cookie.
Meaning if the client who is operating on the Data instance will loose connection the remote garbage collector will call
this in turn calls
Where the Data instance has variable containing last accessed recNo and cookie and passes them to
Hopefully this will give you and idea of what I have done.
[Andrew: Removed the unlock method - refer to "What is the policy on posting questions I saw on the exam / details of how to do the assignment?" in the JavaRanch SCJD FAQ for an explanation why.]
[ June 01, 2005: Message edited by: Andrew Monkhouse ]
Also I want to point out that the archives and javarach.com community helped me to boost-start my assignment. I found here many answers just by simple search.
When I was finished, I visited softlearn-systems.com and purchased softSCJD. It helped me greatly with my documentation.
Indrajeet and his team members helped me with their quality assurance, reviews and testing.
I avoided some serious assignment failures through their help. If you don�t have person to review your GUI and give you feedback these people are the ones you should turn to.
I'm sorry for the unlock method. I thought it was enough pseudo coded
Since the code was pretty much compilable as posted, I didn't take it as psuedo code, which is why I removed the unlock method.
I noticed that the lock method you presented does not throw the RecordNotFoundException (although the unlock method called another method that might have thrown this exception). I don't know if this was deliberatly removed from your posted code, or if you did leave it out of your submission - if so, it might account for some loss of marks.
I noticed that the lock method you presented does not throw the RecordNotFoundException (although the unlock method called another method that might have thrown this exception)
It was intentional. It was intentional. I was counting on people to ask your question.
Anyway thanks for explanation of your reasons for removing the unlock method.
Did you employ a deadlock detection technique?
I started to implement the deadlock detection but I figured that I would have to do deep nesting if multiple client situations would occur. So I just mentioned in my choices and removed the deadlock prevention and restricted clients only to one lock at the time. If client has already one lock and requests another OneLockPerClientException is thrown.
It might be that they reduced my points because of that but the chances that the deadlock would occur are almost the same. At least that is what I�m thinking.