aspose file tools*
The moose likes Certification Results and the fly likes Passed SCJD with 339/400 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Certification Results
Bookmark "Passed SCJD with 339/400" Watch "Passed SCJD with 339/400" New topic
Author

Passed SCJD with 339/400

Bob Reeves
Ranch Hand

Joined: May 01, 2003
Posts: 64
Hi All:
Thanks to the great community at JavaRanch for making the Developer assignment fun! Special thanks to Max for the interesting and thoughtful discussions -- and the helpful softcover! For those who are interested, my results for the uRLyBird assignment were:


I offer these comments on design issues that have been discussed in this group:
1. Remote Object: My design had a single RMI remote object.
2. Datbase access: My design had a single RandomAccessFile/FileChannel that was shared by all threads and persisted for the life of the application.
3. Server Shutdown: I ignored the issue, but documented.
4. Logging: I used 1.4 logging.
5. MVC: I used an MVC architecture that avoided listeners.
What did I screw up with locking? Not sure. I used a lock manager collection and a specialized lock with acquire/release and timeout. However, I used a cookie scheme that permitted cookie sharing for multiple record operations; i.e., I permitted multiple record delete. I also permitted non-unique cookies. Furthermore, I synchronized all record read/write operations for data consistency. One of those choices probably did me in. Those who have read my previous posts probably can guess that I still think my design decisions were correct. Oh well ...
Thanks Everyone,
The latest SCJD
S Bala
Ranch Hand

Joined: Jul 15, 2003
Posts: 49
Congrates Bob!
Your posting will be very useful for the community.
What do you mean by having a LockManager Collection?
is that you had a LockManager class which had a collection for holding the locks and cookies?
thanks,
SB
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

Congrats Bob. I am going to move this to the appropriate Certification Results forum.
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11481
    
  94

Congratulations Bob
Regards, Andrew


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Billy Tsai
Ranch Hand

Joined: May 23, 2003
Posts: 1304
I didnt implement a lockmanager and timeout functionalities but I got full marks for my locking part.


BEA 8.1 Certified Administrator, IBM Certified Solution Developer For XML 1.1 and Related Technologies, SCJP, SCWCD, SCBCD, SCDJWS, SCJD, SCEA,
Oracle Certified Master Java EE 5 Enterprise Architect
Vlad Rabkin
Ranch Hand

Joined: Jul 07, 2003
Posts: 555
Hi Bob,
Congratulations!
I have two questions:
1. DB Interface: have you extended DB interface to provide getSchema/getMetaData method for the client or did you hard coded length of field and so on on the client?
2. if 1. is Yes, have provided appropriate search methods(with exact search instead of prefix one) on the server or have done it client?
3. Have handled booking only in last 48 hours ... If yes on client or server and how?
Many thanx,
Vlad
Bob Reeves
Ranch Hand

Joined: May 01, 2003
Posts: 64
Hi All:
Thanks everyone for their well wishes! Let me provide some answers to the questions raised:
SB:
is that you had a LockManager class which had a collection for holding the locks and cookies?

The LockManager was a class that contained a Map holding my locks. I feel this is a solid approach and am appealing the score assigned.
Vlad:

1. DB Interface: have you extended DB interface to provide getSchema/getMetaData method for the client or did you hard coded length of field and so on on the client?
2. if 1. is Yes, have provided appropriate search methods(with exact search instead of prefix one) on the server or have done it client?
3. Have handled booking only in last 48 hours ... If yes on client or server and how?

1. Well, yes and no. I had a data model for the record that I passed back to the client. This model had methods to get the number of fields, their names, and their lengths.
2. I addressed this by documentation: I provided prefix and exact search methods -- and noted that no range or other search type was implemented.
3. My instructions said the records were to be used in 48 hours. It didn't require anything to be done about records older than 48 hours. I just ignored the 48 hour comment.
4. My client was single threaded. I documented this fact conspicuously since it greatly impact user response time. User response thime wasn't a requirement for my assignment.
Hope this information helps!
Tx
Tong Chen
Ranch Hand

Joined: Apr 26, 2002
Posts: 1011
congratulations to you!


Tong Chen (Seattle USA)<br />SCJP,SCWCD,SCDJWS,IBM XML,MCP.NET,MCAD.NET,MCSD.NET
Max Habibi
town drunk
( and author)
Sheriff

Joined: Jun 27, 2002
Posts: 4118
Nice
M


Java Regular Expressions
Svetlana Koshkina
Ranch Hand

Joined: Jul 08, 2003
Posts: 108
Could it be that while examiner tested your app. (we don't know how they do that), your app. deadlocked or some other exc. poped-up?
I thought if app. gives any exc. examiner can downgrade.
For ex. I packed my app. 4 or 5 days before the upload and tested it periodically (so that i started hating it!!), and i had to make a few fixes before I was satisfied more or less. And on my last day, I found one IOExc. from property file in one deep corner of my gui and had to re-pack again. My point is that there always can be a chance that something went rough.
???
Bob Reeves
Ranch Hand

Joined: May 01, 2003
Posts: 64
Hi Svetlana:
Yes, it's always possible.
Deadlock is difficult to test since the threads have to line up closely. I used the concept of "ordered resource acquire" to avoid deadlock, and this technique is known to work. That is, work if correctly implemented
My RMI tests did throw an exception: server connection refused. This occured when running 20 threads for 100 iterations. I read that other posts in SCJD found this problem, and some noted that it's a flaw in Sun's implementation of RMI. I can't think of any special exceptions that the lock subsystem could throw though, even runtime exceptions.
Tx
Vlad Rabkin
Ranch Hand

Joined: Jul 07, 2003
Posts: 555
Hi Bob,
Well, yes and no

Well, I am afraid I don't really understand how you delivered
DataModel and exact search by not extending interface?
Either you used just a separate interface or some kind of observer pattern.
Can you specify these issue a bit more in detail?
Thanx,
Vlad
Bob Reeves
Ranch Hand

Joined: May 01, 2003
Posts: 64
Hi Vlad:
You asked how I delivered prefix and exact search.
I used the database specification that says a null termination is used for fields that are shorter than full field width. Thats is, for prefix search, I just sent a plain string as the query. For exact search, I appended a null termination at the end of the string. The query engine inspected the search string to decide which type of search to perform.
Hope that helps!
Tx
PS: In thinking about my results, I'd advise you not to add anything extra not required by the specification. Otherwise, you don't get any plus, but you might get a deduction for "unnecessary" complexity.
Billy Tsai
Ranch Hand

Joined: May 23, 2003
Posts: 1304
There is a method in the String API that can be used to perform search.
I think the reason u lost mark in locking is because of the unnecessary complexities.
Vlad Rabkin
Ranch Hand

Joined: Jul 07, 2003
Posts: 555
Hi Bob,
I guess you didn't understand my question.
I am concerned of the DB interface, not the way search is implemented.
You said::
1) you have getDataModel() method on the SERVER
2) you have additional search methods
a) original find() // prefix
b) second findExact or whatever it is called on the SERVER
YOu said you didn't extend DB interface.
How your client application gets DataModel object from the server, since it is not in DB interface, and you DIDN'T extend DB interface toprovide these method???
Tx,
Vlad
Bob Reeves
Ranch Hand

Joined: May 01, 2003
Posts: 64
Hi Vlad:
OK, I understand your concern.
My server contains a database object that implements DBAccess. The server itself doesn't implement DBAccess (i.e., a Facade Pattern). What the server returns to the client proxy is a record model, not the String [] defined in DBAccess. Specifically, the server has a method:
RecordModel readRecord(long recNo).
I don't have findPrefix and findExact search methods. I just have the
findByCriteria
Vlad Rabkin
Ranch Hand

Joined: Jul 07, 2003
Posts: 555
Ok,
Tnax, Bob!
Vlad Rabkin
Ranch Hand

Joined: Jul 07, 2003
Posts: 555
Hi Bob,
I forgot to ask you the main question I am concerned about!
How did you handle IO/Remote Exception. They are not in signature
of menthods in DB interface. I wrap them all now in my own unchecked exception. Some people wraped them in RecordNotFound and DuplicateKeyException.
How have you done?
Vlad
Bob Reeves
Ranch Hand

Joined: May 01, 2003
Posts: 64
Hi Vlad:
My take on exception design is that it depends on how you want the client to handle them. I decided that I wanted the client to handle local/remote calls identically, thus I chained all server-side exceptions in the RemoteException.
My server itself didn't implement the Remote interface, but was wrapped in what I called RemoteServer, which did. The RemoteException went only from RemoteServer to my ClientProxy, where it was unchained and thrown to the client. Note: If you do it this way, you must consider how you want the actual RMI exceptions handled.
Some might take exception to this approach ...
Tx
Vlad Rabkin
Ranch Hand

Joined: Jul 07, 2003
Posts: 555
Hi Bob,
that is exactly what I do with RemoteExceptions,
but how did you handle IOException? There must be handled in local mode also, but they are not in the method signatures of DB interface, which we are not supposed to change.
As I said, I use now own unchecked Runtime exception, but it is a bit risky.
I just want to know how you did handle it.

Tx,
Vlad
 
Consider Paul's rocket mass heater.
 
subject: Passed SCJD with 339/400