damien lepage

Greenhorn
+ Follow
since Nov 25, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by damien lepage

Thanks.
I took it 4 weeks ago so it took a little less than 4 weeks to get the results.
15 years ago
Hi all,

I passed SCJD certification (URLyBird 1.2.1) with 377 /400

Here is the breakdown of my score:
General Considerations (maximum = 100): 99
Documentation (maximum = 70): 70
O-O Design (maximum = 30): 30
GUI (maximum = 40): 31
Locking (maximum = 80): 80
Data store (maximum = 40): 40
Network server (maximum = 40): 27

I'm not surprised for the points I lost in my Swing interface, I was really a newbie with Swing.
But unfortunately I don't understand why I lost those points in the network server.
Anyway I'm very happy with my score.

Thanks to Andrew Monkhouse for his very useful book and to all people who wrote very useful posts about this exam here.
I espacially used:
https://coderanch.com/t/141585/Sun-Certification-Results/certification/Passed-SCJD-with-Points#691840
https://coderanch.com/t/184523/Developer-Certification-SCJD/certification/NX-Notes-design-passed

The main thing I made differently in comparison with what I read here, is that I used a 4-tier design instead of 3-tier:
- Presentation: swing
- Business tier: contains business rules (it's also the only tier available remotely)
- Integration tier: converts data between the business layer which uses Room objects and the data layer which uses String arrays.
- The data tier: low-level operations to retrieve and store data in the database file (implementation of provided interface)
15 years ago
I'm not a swing expert but I read that swing events rely on a unique event-dispatching thread.
So, even if the user is very very fast (or his machine very very slow ), I don't think it's possible to trigger setParameter from more than 1 thread.
In fact, the code which calls setParameter is abstracted with the observer pattern, but I don't see anything which imply multi-threading here.
Am I wrong ?
Thanks K. but my concern was only about the utility of synchronization when properties are loaded or stored in the file.
These methods in SavedConfiguration class are called only from the swing application so I don't think it's necessary to synchronize here.
Here is the code:
I was wondering the utility of these synchronized blocks as well and found nothing in JavaRanch about it, except this post.
IMHO, these synchronized are not needed because the methods are called from the unique Swing thread.
However, it could be considered as defensive coding given that the SavedConfiguration class is not Swing aware and could be called from anywhere.
I don't plan to synchronize properties file access for my submission, am I missing something ?
Thanks Marc. You're right, I missed this shadowing.
Hello,

In question 7 page 748, I think the answer C could be correct.

The question says only that a and b are two private variables, they're not necessarily primitives. Thanks to auto-boxing "a" could be an object of type Integer so we could synchronize on it.

Thanks

Damien