Thanks to you all for helping me pass SCJD (UrlyBird). I would just like to share a few of my thoughts and air my frustrations.
I used sockets rather than RMI because I wanted to learn something about it.
This was a perverse decision in terms of passing the exam. Although superficially straightforward, it is lots more work. I felt like I had dug a big hole for myself and then had to climb out. I was rather worried that I would have to give somewhat less than truthful reasons for this choice and I'm always unhappy about that. If I had been less lazy, I would have then scrapped that solution and patched in an RMI replacement. Anyway I seem to have got away with it. In fact my server got full marks (just like everyone
I also amused myself at my own expense by having my GUI do things which were
not really required - table sorting, limits on number of records returned,
options for case-insensitive and prefix searching, undo only your own bookings, dialog to cancel slow responses etc. I probably got away less well with this with 31/40.
For the database, I went over the top again with in-memory indexes on name and location and full (efficient, I believed) solutions for create, delete etc. Once again I escaped with full marks.
My documentation was perfect (!) and my OO design acceptable on all sides at 25/30.
Overall considerations at 85/100 would seem to be a little below par. Perhaps I was punished for some of the self-indulgence which caused my
solution to be rather big and certainly way beyond what I had expected would be needed from reading Habibi, Patterson and Camerlengo.
So far I am pleased enough, I had given myself a tough time and survived.
Then the big irritation. 44/80 for locking strikes again. I spent a fair time reading your many contributions on this. This was initially very helpful in getting (what I thought was) a sound picture of what was to be
achieved. It began to seem straightforward. I then set to work and came up with a design. I was somewhat surprised at how intricate this needed to be in order to meet the "consume no cycles" requirement and not allow stuck locks. I looked for standard solutions (I have the O'Reilly threads book) and did not find one. Finally I was proud of my implementation which I tested carefully. If anything I thought it was probably too good and might
be marked down for extravagance. (70 out of 80 sort of thing).
But no. Just like so many, I got 44 out of 80. Am I correct in thinking that there is no answer to this puzzle? It happens to lots of people and we don't know why? I'm left wondering if:
a. I fell foul of some narrow technicality which doesn't matter much. Press on regardless.
b. I made some understandable error that I should learn from. I should spend some time on this.
c. I fall short of some essential quantum of capability which is beyond my
comprehension. I should accept my limitations and move on.
The result is a rather poor pass overall which I don't feel very proud of. Everything else I am happy with - I feel it reflects my knowledge, abilities and perversities. I also feel that this was a worthy assignment and not at all trivial. It would have been deeply satisfying to have done well in it.
Ah well, I suppose I could seek redress with SCJD 1.5. But life may be too short.
Regards to all...