Sakke Wiik

Greenhorn
+ Follow
since Mar 13, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sakke Wiik

I received the certification via mail. No version number is shown, simply "Sun Certified Developer for the Java 2 Platform".

cheers,
Sakke
19 years ago
Ko Ko, the title of the certification is "Sun Certified Developer for the Java 2 Platform". There is no version stated anywhere.
19 years ago
I used generics, autoboxing/unboxing and enhanced for loop. Generics made the code clearer in many parts, at least when you get used to the syntax.
I use the IntelliJ IDEA IDE for development, which has a refactoring button that generifies the whole project, so that was a breeze.

The title of the certification is "Sun Certified Developer for the Java 2 Platform". No version stated. I haven't received any papers yet, so I cannot tell what they will say. At least my SCJP certification states 1.4 in CertManager. I will be in touch when I receive the papers.
Nick, I see your SCJD has a version. Did you have a version displayed in CertManager?

I didn't state in my documentation why I used 1.5. I thought that would be unnecessary. I don't think anyone using 1.4 states in the documentation why they chose 1.4 instead of 1.3 either.

Special thanks to you Andrew for all your postings. I found quite many helpful ideas in them.

cheers,
Sakke
19 years ago
Here's some proof that it is ok to use Java 1.5

I took URLyBird v1.2.1.

General Con: 100 88
Documentation: 70 60
OOD: 30 30
GUI: 40 28
Locking: 80 80
Data Store: 40 40
Network Server: 40 30

I'm happy with my score, but if feels bad to not get any comments on what was not good. That's the way you learn new things, isn't it?

Many thanks to everyone on the SCJD forum!
19 years ago
Why exactly shouldn't I use J2SE 5 features? I recently generified my code. Do you really think there is a risk to get less points doing so?

My instructions says:
You may develop your code using any implementation of the Java 2 platform, but the submission that you return must have been tested and shown to work under a production (not development) version of the Sun Microsystems' Java 2 platform and that platform must not have been superseded by a new production version for more than 18 months by the time you make your submission.
I'm doing URLyBird 1.2.1 and did the locking mechanism as many others: I use the unique Data-object as lock. But when i scanned the instructions for all "musts", I stumbled upon this comment inside the DBAccess interface which I must implement:
// Returned value is a cookie that must be used when the record is unlocked,
// updated, or deleted.
How strict is this "must"? It's not stated in the "What you must do"-chapter. And how come I seem to be the only one that must use the cookie for unlocking?
Maybe it's enought to do an add-on to my locking mechanism by storing a lockCookie in my Data-object and verify the cookie? Seems like an unnecessary double-check. Any ideas?
Cheers,
Sakke

But how would you test for deadlock, thread contention and livelock ? Can JUnit help me creating concurrent threads ?


Read this document, it explains how to use GroboUtils(http://groboutils.sourceforge.net/) for testing threads with JUnit: http://today.java.net/pub/a/today/2003/08/06/multithreadedTests.html
It also has basic dead-lock support using timers.

How do I know my database status after the testing.


Just re-read the databasefile and match it against the original. Or you could have the original stored as a static variable somewhere (or a more complex object if you for example read the databasefile into objects).
I have a BaseTest-class which I extend in my testclasses instead of TestCase, in which setUp-method I simply copy the original databasefile to a test-directory. This way each test works against a newly copied original databasefile, and after tests I could match the files if I need.
cheers,
Sakke


Your concept is interesting. However do you have a requirement for the lock() method to block until the lock is granted? If you do have such a statement, then client 2 will not get notification that the record is currently locked.


Ok got it. So I assume this statement alone ruins my idea. One option less to think about .
Hi,
I started working on URLyBird 1.2.1 and have read this thread. I seem to have a quite different view of the locking mechanism than most of you, or maybe I just haven't spent enough time on the documentation . Some people even says the lockCookie is a stupid requirement doesn't seem stupid at all if you look at the problem in another way.
The common solution here seems to lock a record directly before updates/deletes. Here's my view of the locking:
1. Client1 wants to book a record. Client1 selects a record for update. So the lock is set on the selected record before he starts updating the row.
2. Client2 selects the same record for update, but gets a notification that this record is locked. Client2 understands the situation.
3. Client1 klicks 'book record' after he has modified the data. Now the real update occurs, and the lock is unlocked directly after the real update.
Here's another check that should be added too(using some common sense):
4. Client3 comes in after Client1 has made the update. Client3 selects the same record for update. Since the record has a client id in the "owner"-field (from Client1s update), he will be notified that the record is already booked.
Makes any sense?