aspose file tools*
The moose likes Certification Results and the fly likes Passed !!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Certification Results
Bookmark "Passed !!!!" Watch "Passed !!!!" New topic
Author

Passed !!!!

Eric Janssens
Ranch Hand

Joined: Sep 26, 2005
Posts: 53
Today I had good news. I was trying to find my result since 6 weeks via the sun website without any success but after rereading the FAQ on javaranch, I find an interesting link which gives me already all the scores of my Cert! (https://www.certmanager.net/sun_assignment/)

The maximum number of points is 400, to pass you need a score of 320.
Section Summary:
General Con: 100 92
Documentation: 70 70
OOD: 30 30
GUI: 40 29
Locking: 80 80
Data Store: 40 40
Network Server: 40 40
Total: 400 381

I am really happy since I have few perfect scores but I am a little sad also because it takes me a long time to make a nice framework for my GUI. I really think that I have done a good job. Next time I used it, I got nice results (less complexity, faster, modular, etc.) but the examiner does not seem to have the same view as me

Anyway, Thanks a lot for all the help I got from this forum. My only advice for the certification (if you can spare the time) is to try first by yourself without reading too much because it is just plain fun and you learn more. And who knows perhaps you can find better way to do it all by yourself.


This forum is so good to find new ideas about logistics, testing, etc.
Thanks again!



ps: I forgot to mention that my assignment was "Bodgitt and Scarpet"
[ May 08, 2007: Message edited by: Eric Janssens ]
Ken Boyd
Ranch Hand

Joined: Dec 10, 2003
Posts: 329
Congratulations on great news !!

If possible can you tell more about locking since you got perfect score.

Did your Data.java allowed multiple booking of rooms for one client? My assignment is URLyBird if your is different can you tell me in general terms what was done for deadlock detection and prevent it from happening?

It will be nice if you look at very recent thread about the same with more details explanation.

http://www.coderanch.com/t/189117/java-developer-SCJD/certification/deadlock-pointer-verification

Thanks


SCJP, SCWCD, SCBCD, SCJD, BB Java2 and JSP1.1
Eric Janssens
Ranch Hand

Joined: Sep 26, 2005
Posts: 53
@Ken Boyd

I got the B&S assignment.

From my signature of the DBMain interface, it does not prevent multiple lock for the same user. My Data class does not prevent it since it can be used by an other program where a multiple lock on different records can exist. Of course if 2 or more programs are trying to lock multiple records at the same time, it can be deadly. I think it is the responsibility of the clients of Data to use it properly. (it can be a good idea to stipulate the possible deadlock problem in your doc)

But honestly, I did not focus too much on this aspect since I extend the locking mechanism of DBMain interface to permit the realization of few "must" of my own assignment. I believe that depending of the "must" you have for your assignment a 100% correct solution from someone else can become a 100% incorrect solution for you.
[ May 09, 2007: Message edited by: Eric Janssens ]
Ken Boyd
Ranch Hand

Joined: Dec 10, 2003
Posts: 329
Thanks Eric for prompt reply.

In assignment it says following for locking


Locking

Your server must be capable of handling multiple concurrent requests, and as part of this capability, must provide locking functionality as specified in the interface provided above. You may assume that at any moment, at most one program is accessing the database file; therefore your locking system only needs to be concerned with multiple concurrent clients of your server. Any attempt to lock a resource that is already locked should cause the current thread to give up the CPU, consuming no CPU cycles until the desired resource becomes available.




Does that say loud enough that I should not worry about problem I mention in recent thread (link provided) that one client won't try to lock multiple records and creates deadlock..

just try to verify with what other things lately not many ranchers are active on this forum so your reply is appreciated..

Thanks,
Ken
[ May 08, 2007: Message edited by: Ken Boyd ]
Eric Janssens
Ranch Hand

Joined: Sep 26, 2005
Posts: 53
Does that say loud enough that I should not worry about problem I mention in recent thread (link provided) that one client won't try to lock multiple records and creates deadlock..


If by Client you mean outside programs accessing the database via the Data interface, you do not need to be worried about them. But you can always mention in your doc that those clients must take into consideration possible deadlock scenario.

If by Client you mean your own concurrent clients of your own server. It is better of course to be sure that no multiple lock for the same client can occurs. You just need to be sure that there is no way a client can lock multiple records at the same time.

The Data class is just the common access the database shared by all the applications in the company. You do not need to put everything there. You can always prevent multiple locks for one client at any upper level in your application.
[ May 09, 2007: Message edited by: Eric Janssens ]
Ken Boyd
Ranch Hand

Joined: Dec 10, 2003
Posts: 329
Originally posted by Eric Janssens:

The Data interface is just the common interface to access the database shared by all the applications in the company. You do not need to put everything there. You can always prevent multiple locks for one client at any upper level in your application.


What if tester creates test where one client i.e. one of concurrent clients of server try to book multiple records??

e.g.

Data db = new Data(); // per client one data obj

now tester creates 2 threads under db ans hashCode is 18166. So one client i.e. 18166 will create two threads to do the following.

Now thread-1 will run and do the following


Cookie1 = lockmanager.reserveRoom(recNo);
update (record 10,Cookie1);
Cookie2 = lockmanager.reserveRoom(recNo);
update (record 11,Cookie2);
unlock(record10, Cookie1);
unlock(record11, Cookie2);


After that thread-2 will try to run


Cookie1 = lockmanager.reserveRoom(recNo);
update (record 11,Cookie1);
Cookie2 = lockmanager.reserveRoom(recNo);
update (record 10,Cookie2);
unlock(record11, Cookie1);
unlock(record10, Cookie2);


Now thread-1 will lock it and thread-2 will wait forever to get lock on record 10 and creates deadlock.

Instead of this if tester run test on 18166 like



Cookie1 = lockmanager.reserveRoom(recNo);
update (record 10,Cookie1);
unlock(record10, Cookie1);
Cookie2 = lockmanager.reserveRoom(recNo);
update (record 11,Cookie2);
unlock(record11, Cookie2);


things will work like a charm. Even if RMI creates different Data obj per request i.e. different id 18167..18168 etc it will work without any problem for 50 threads x 1000 time booking record-10 i.e. 50 concurrent clients (each with different hashCode) of server try to book one record not multiple records.
CSR- means customer service representative

In short my Data class will deadlock if multiple concurrent clients (many CSR) i.e. 18166,18167.. but each (meaning 18166 - one CSR) requesting multiple room locks instead of one room per request to server.

I know it is long description but it will help me a lot if you share your input.


Thanks,
Ken
[ May 09, 2007: Message edited by: Ken Boyd ]
Eric Janssens
Ranch Hand

Joined: Sep 26, 2005
Posts: 53
My Data class does not prevent multiple locks because its contract define in my DBMain interface does not indicate that it is not possible. This can be completely different in your DBMain interface. For example, my DBMain interface has no cookie at all.

My philosophy had been to make my Data class as compatible with the spec. define in DBMain interface as possible. Why? Because it will be used by other company applications and I want an integration as smooth as possible (I am a little suspicious about the quality of the code in the company after seeing their in house DB file ).
If you forgot the role-playing aspect, let's say that the automatic program that will test your submission will surely use the DBMain interface to test your Data class thoroughly (Locking, Data Store, etc.)

I must add that my Data class implements a sub interface of DBMain to permit me to add few additional methods. Again it depends of your assignment. In mine I had no trouble to justify it.


Now for my application, it is not possible for a user to lock multiple records.


Ps: I do not want to validate any of your code since it is completely dependent of your DBMain interface + the MUSTs of your assignment. I do not want to make some random guess, and I do not want to make a second assignment . But I really hope that the few key ideas I give you in this post will help you to solve your problem.
[ May 09, 2007: Message edited by: Eric Janssens ]
Ken Boyd
Ranch Hand

Joined: Dec 10, 2003
Posts: 329
Thanks for your reply
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Passed !!!!