• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Passed !!!!

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Ranch Hand
Posts: 329
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

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

Thanks
 
Eric Janssens
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@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
Posts: 329
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 329
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 329
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic