It's not a secret anymore!*
The moose likes Certification Results and the fly likes Passed SCJD 155/155 points Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Certification Results
Bookmark "Passed SCJD 155/155 points" Watch "Passed SCJD 155/155 points" New topic
Author

Passed SCJD 155/155 points

Arto Santala
Greenhorn

Joined: Jul 24, 2002
Posts: 8
Yeah, couldn't believe it myself. I'm feeling great, and I think there will be some celebration tonight.
Big thanks to this forum and people here. I already did my programming assignment once, but fortunately I decided to spend some time around here. I ended up re-doing my locking scheme completely. Just reading this forum has been unbelievable help for me as well as giving a good warm feeling - there are others out there trying the same thing I'm trying.
So, the basic planning decisions:
-I used RMI
-I didn't implement local locking
-I left the original files as untouched as possible - but I did implement criteriaFind and a separate utility method parseCriteria
-I used a few interfaces and a client facade to separate re-usable db code (model), businesslogic (flight booking), and UI.
-I added some cleanup stuff that wasn't in requirements
So pretty standard stuff.
Also-
-Good documentation is essential
-I hand-coded everything, with EditPlus text editor, and used Apache ANT for project management and packing - helped me to keep stuff fast and errorless. ANT can compile&create RMI stubs & javadocs and package stuff and move it around. Great tool! I didn't put any ANT-specific stuff with the final package, though.
So - thanks once more, and keep up the hope! I'm heading for the architect forums - after a small break.


Sun Certified Programmer for the Java 2 Platform
Sun Certified Web Component Developer for the Java 2EE Platform
Sun Certified Developer for the Java 2 Platform
Gosling Gong
Ranch Hand

Joined: Jun 20, 2002
Posts: 51
Congratulations!
Could you explain your GUI and Exceptions handling?
did you use MVC in GUI, and did you chain the exception?
Arto Santala
Greenhorn

Joined: Jul 24, 2002
Posts: 8
I'm not sure how deep into it it's fair to go - but the basic idea of my GUI was this:
Controller.java handles all UI events (Well, most of them. All that make sense at least) and doesn't contain any swing - it calls methods on...
ClientUI.java - which contains most UI code - and registers Controller as its listener.
I also had FlightTableModel - as a model for JTable, that cached results from database and offered them as nice JTable model.
Controller uses ClientFacade.java, which contains businesslogic, and it uses either RemoteDataClient, or Data directly, depending on startup mode. I also had errordialog and seatreservationdialog, and a nifty help page which uses HyperlinkHandler - it shows use-time help screens and works as HTML browser.
I think this (Help browser) was mostly unneccessary but I felt like doing it since in my experience UI should be very easy and intuitive and offer many ways of doing the same operation - so I couldn't bear letting what I felt unfinished product out of my hands, even though it wasn't in the specifications.
All in all, pretty fun excercise. I tested this also with my girlfriend, and since she seemed to be able to use it, it seems pretty intuitive.
Robin Underwood
Ranch Hand

Joined: May 01, 2002
Posts: 117
Congratulations! Great score!
Sam Stackly
Ranch Hand

Joined: May 04, 2002
Posts: 109
Well Done Arto , Congrats,
Can you explain how you implement lock(-1) and did you just implement it in server side (ServerGUI) or both side (Client and Server GUI)
Thanks in advance
Sam
Arto Santala
Greenhorn

Joined: Jul 24, 2002
Posts: 8
Thanks, guys. Locking was implemented remotely in RemoteDataClient - required by the specifications. But I had a separate ClientFacade class that used RemoteDataClient to offer simpler close-to businesslogic operations for the Controller. By businesslogic operations I mean for example bookFlight(flightCode, seats).
So RemoteDataClient is exactly like Data-only works remotely. ClientFacade calls the lock() unlock() pair when needed. In effect, I implemented client doing the locking, since I this is the way I interpreted the original specification.
Hint: As I understand, the background model (Existing code) should be left pretty open-ended, so that it can be used for other projects as well. That's at least my judgement after reading the specification carefully. So no flight-booking-application-specific code to the Data class.
Arto Santala
Greenhorn

Joined: Jul 24, 2002
Posts: 8
Oh, lock(-1) - there's great advice already in the forums. I ended up making a routine that will try to lock every existing record and wait until it can get the lock on them, by calling lock(record) for each record.
This ensures that all updates are done. Of course, you need to also make sure that locks are not left hanging.
Sam Stackly
Ranch Hand

Joined: May 04, 2002
Posts: 109
Thanks Arto for you quick reply,
Just a quick question , did u implement lock(-1) in server side (ServerGUI while admin wants to shutdown server ) or in client side (so each client can close, or better I say lock the whole database)?
Thanks again
Sam
Arto Santala
Greenhorn

Joined: Jul 24, 2002
Posts: 8
Oh, I implemented lock(-1) on server side, but it can be called remotely by client as well, if neccessary. Actual implementation of locking a record or database is in LockManager class, which is called by server-side code.
Sam Stackly
Ranch Hand

Joined: May 04, 2002
Posts: 109
Arto hope you will forgive me about asking to many question but I stuck in this lock(-1)!!
so you made a routine that would try to lock every existing record and wait until it can get the lock on them, by calling lock(record) for each record but how did you prevent new user for asking to lock a record while you were waiting to lock each record in entire database? Did you use a Flag or something like that?
Thanks
Sam
Arto Santala
Greenhorn

Joined: Jul 24, 2002
Posts: 8
No problem, I'll be glad to answer as long as I'm online.
I didn't feel the need to check for client locks. If client tries to lock a record that has already been locked - client doesn't get a lock and so can't try to commit anything. If client tries to lock an unlocked record - let it go ahead. Typical lock&unlock situations take a second at maximum, so server can afford to lock it. I decided that server shutdown is not about speed - in my solution it was more about taking the time, letting transactions be complete, and just one by one locking the records.
In typical use server locks all records inside a second. Only situations that would cause any problems would be 1) improper client locking - no unlocking (can be handled on client end with timeout sanity checking) 2) operations that take a loong time to commit (we don't have such operations here neither we will be having for long time).
That's my approach. But I have to say that I think more important than what you do is to have a pretty good explanation on why you did. I've seen very high scores with very different approaches. So pick what makes sense top you. Fortunately these forums are full of ideas.
Sam Stackly
Ranch Hand

Joined: May 04, 2002
Posts: 109
Thanks Arto, Now it's clear for me
Sam
Sam Stackly
Ranch Hand

Joined: May 04, 2002
Posts: 109
Hi Arto,
Sorry to bug you again,
Just a quick question, If you implement lock(-1) in LockManager, how do u know the total number of records? I assume your LockManager is seprate class .
Thanks again for your help,
Sam
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
Perfect job Arto


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
Ashik Uzzaman
Ranch Hand

Joined: Jul 05, 2001
Posts: 2370

Congrats Arto... , very
And your feedbacks are also
Wish you success in future also.


Ashik Uzzaman
Senior Member of Technical Staff, Salesforce.com, San Francisco, CA, USA.
Rasika Chitnis
Ranch Hand

Joined: Jun 19, 2001
Posts: 131
did you track client id's in your locking scheme ?
Eduard Jodas
Ranch Hand

Joined: May 14, 2002
Posts: 80
And another question: did you followed strictly the Java Coding Rules?
P.d: Congratulations!
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

Congratulations Arto. Very well done. Please stick around and help us out at the SCJD Forum. Pretty soon we can get everyone getting 155/155.
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Arto Santala
Greenhorn

Joined: Jul 24, 2002
Posts: 8
Thanks, Mark, your posts were among the most useful I read while preparing for this.

Yes, I tracked clients, but I didn't use any specific id values for that. Instead, I had a separate instance for each client on the server end - in other words, I used the object instance itself as identifier.
As for coding standards, I am not 100% sure what you are thinking about, but I follow standard naming rules at least, for methods, classes, constructors, final variables, etc, automatically, since they make sense. If you meant standard patterns, I used a few and documented well what I was using.
Main point is to explain well what you were doing - the more the reader understands the better you are probably going to do. And using standard approaches, naming and patterns, makes design and code more readable and clear --> easier to understand, so it makes sense always, especially here. This works well in real life problems, and works well for this certification as well.
Younes Essouabni
Ranch Hand

Joined: Jan 13, 2002
Posts: 479
Great job artho!
I hope that you will stay around to help us
Wish you the best


Younes
By constantly trying one ends up succeeding. Thus: the more one fails the more one has a chance to succeed.
Sarada Bhasker
Ranch Hand

Joined: Sep 11, 2000
Posts: 94
Hi,
Congratulations!
Can you tell me something about documentation and design choices doc. Like how many pages each was and what all things you mentioned in that
Regards
Sarada
Sarita Gupta
Ranch Hand

Joined: Aug 12, 2002
Posts: 43
Congratulations Arto...
Sarita


There are no great people in this world, only great challenges which ordinary people rise to meet.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Passed SCJD 155/155 points
 
Similar Threads
passed 151/155!!!
Passed with 147/155 !
Passed/Bestanden 147/155
The perfect solution 155/155 !
Passed SCJD 155/155