Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Passed: 354/400

 
Alex Belisle Turcot
Ranch Hand
Posts: 516
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I passed! I was hoping/aiming at a better score, but it's all behind me and it's all good

General Considerations (maximum = 100): 99
Documentation (maximum = 70): 70
O-O Design (maximum = 30): 30
GUI (maximum = 40): 31
Locking (maximum = 80): 44
Data store (maximum = 40): 40
Network server (maximum = 40): 40

Thanks all, and wish you the best!
Alex
 
mohamed sulibi
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi;

very good , but what happen in Locking ???,
please provide us with notes that we put aside.
do you check if the record exist in lock and unlock ?
do you synchronized the HashMap used for the cookie ?
why you think your score in locking is 44/80 ?

BR;

Mohamed Darim.
SCJP, SCJD B&S in progress ... (upload date 1/April/2008).
 
Alex Belisle Turcot
Ranch Hand
Posts: 516
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hard to tell what I did wrong...

- first check in lock/unlock is to check if the record exist (index not out of bound or deleted)
- I did not have cookie, I use the thread Id to identify the client, and put as a constraint that the whole cycle "lock / operation / unlock" must be done within a single RMI call.
- I don't keep the file "reserve" at all time, so if you start a 2nd time the application, you technically alter a reserve record from the other application.
- A client that holds a lock and tries to lock it again, will go through, no need to wait for himself to release the lock.
- I did not care about a thread waiting for eternity, I did not handle the "InterruptedException".
- isLocked method did not synchronized on the structure, simple check if it's there or not => hash.contains()..
- I used an "HashMap", not a WeakReferenceMap.
- I used notifyAll, called from unlock only.

I'm sorry I'm not a big help, I thought I had a good solution, obviously, there is a flaw.

If you want, ask direct question and I can answer, but as to "why the score", I can't tell..

Regards,
Alex
[ January 26, 2008: Message edited by: Alex Belisle Turcot ]
 
Musab Al-Rawi
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congratulations Alex
 
Dmitri Christo
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well done!!
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congratulations Alex
 
Naveen Narayanan
Ranch Hand
Posts: 114
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congratz Alex
I was also hopping a better score for you �.
Definitely you deserves more �
 
rohan tiwari
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congrats....The result came early. I think you submitted some 10 days back.
354 is a good score.
 
Roberto Perillo
Bartender
Posts: 2271
3
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Alex Belisle Turcot:
I passed!


Howdy, Alex.

What did I tell you, man?! I knew you going to make it! Congratulations, my friend!!! You probably didn't get a better score because the guy that was evaluating your app wasn't having a good day
Now, let's have a beer!
 
Gabriel Vargas
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Alex,

Congratulations, I know how you fell about this score .
 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congrats!
 
John R Roberts
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congrats!!
 
Harish Yerneni
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congrats, Alex. What next?

Harish
 
Sean Beecroft
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congrats Alex!

I think thats a pretty good score. I've got a long way to go on mine, it seems. Finally I've got the app meeting the requirements. Now its a long trek of refactoring and fixing things. I followed you through it, so I'm glad you passed. Now I'm worried about my own.

WeakReferenceMap? Uh-oh back to the drawing board for me.
 
Ciaran Cahill
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Alex,
There is a problem using the thread ID to identify the client when you are using RMI. RMI does not actually guarantee that it will always use the same thread to execute a task as the thread that enters the method. It actually switches the threads around in the background.
I only found this out yesterday and I am trying to submit in the next few days!! I was sure you would be guaranteed to always have the same thread in this situation.
 
Alex Belisle Turcot
Ranch Hand
Posts: 516
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ciaran Cahill:
Hi Alex,
There is a problem using the thread ID to identify the client when you are using RMI. RMI does not actually guarantee that it will always use the same thread to execute a task as the thread that enters the method. It actually switches the threads around in the background.
I only found this out yesterday and I am trying to submit in the next few days!! I was sure you would be guaranteed to always have the same thread in this situation.


Hi,

you should start new thread for your questions.. but never mind for now:

You are right, if the "client" calls multiple methods, the thread id will not identify him uniquely!

This is why, I documented the following as a constraint : the entirely cycle "lock/operation/unlock" must be performed within a single call.

For this, the "Service/Business" object I provide to the clients ensure that it locks and unlocks within a single call. Thus, the same thread is used for the whole cycle.

For example, the client would call "businessObj.book()". The book method (on the server side) will lock, book and unlock.

Another idea I had, which I didn't do, was to set the thread name to the customer ID, and use the thread name to identify the client across multiple call. The drawback I saw is if 2 clients are concurrently using the same customer ID.. well you get the picture.. But you can document it and flag it as a constraint, or feature

Regards,
Alex
 
Alex Belisle Turcot
Ranch Hand
Posts: 516
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by mohamed sulibi:
hi;

very good , but what happen in Locking ???,
please provide us with notes that we put aside.
do you check if the record exist in lock and unlock ?
do you synchronized the HashMap used for the cookie ?
why you think your score in locking is 44/80 ?

BR;

Mohamed Darim.
SCJP, SCJD B&S in progress ... (upload date 1/April/2008).


You know, I looked back at my locking code (to answer another rancher)..

I actually noticed something really strange.. I was using notify while all along development, I used notifyAll. I believe I switched it to perform some tests and did not put it back.

I also documented everywhere (even 2 line above the call, as javadoc..) that I was using notifyAll...

From my tests, I remember that my code was not thread safe with notify.. so, that's a pretty good guess..

I was pretty pissed at myself that day I noticed it. Couldn't log on javaranch for 2 days, just the sight of the moose made me think of notifying I'll have to live with this for the rest of my life

bye,
Alex

[ February 13, 2008: Message edited by: Alex Belisle Turcot ]
[ February 13, 2008: Message edited by: Alex Belisle Turcot ]
 
conny pemfors
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Alex Belisle Turcot:
Hi all,

I passed! I was hoping/aiming at a better score, but it's all behind me and it's all good

General Considerations (maximum = 100): 99
Documentation (maximum = 70): 70
O-O Design (maximum = 30): 30
GUI (maximum = 40): 31
Locking (maximum = 80): 44
Data store (maximum = 40): 40
Network server (maximum = 40): 40

Thanks all, and wish you the best!
Alex




Congrats Alex!

I passed the SCJD certification, 30th of dec 2007 with score of 344 points.
Looking forward to take the SCEA Exam, it's seems to be a quite funny assignment.


BR
Conny
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic