• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Repeating the SCJD

 
Joe O'Keefe
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I submitted the assignment part of the SCJD a few days ago. Unfortunately there is a slight typo in my lock() method. I used ReentrantLocks for my locking, which I think were used correctly. The only problem is that when I call Condition.await(), I call it twice. It is a complete typo.

I added in a call to await with a time out, but forgot to remove the original call I had to await(), which was just an ordinary call (no timeout value specified). It is one line of code that I missed (I was so intent on making sure await() was called and just didn't see it, I can't believe it happened

Because I was testing the code with lots of threads (1000+), and testing all of the operations together (create, delete, update etc.), the problem never actually occurred (it would only occur when two threads are locking the same record).
But when I test the Data class now with just 2 threads, doing only locking and unlocking, it happens more often than not - because of course the waiting thread will be signalled, but it will wait a second time....!

So basically - is it possible just to re-submit the project? Or do I have to repeat everything, the project and the exam? I sat the exam just today. (It went great!).

 
Roberto Perillo
Bartender
Posts: 2271
3
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey, Joe.

Don't give yourself a hard time. These things happen. After all, it's not the end of the world!

Looking at this page, it looks like you just have to acquire the voucher that corresponds to this exam to resubmit your project. I don't know for sure, but apparently, you just have to resubmit it. And it also looks like this voucher is half the price (the prices may vary in different countries).
I believe this is it. And do not forget to fix your code this time!
But anyway... who knows if you get lucky and they do not see this, and you pass (I know this is a very remote chance, but still!)?

Good luck, partner. Have a good evening!
 
Joe O'Keefe
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Thanks for the link, I didn't realise you could do that. The problem doesn't always happen so it's possible they could give me a very low mark for locking. In an ordinary situation where you lock, modify and unlock from multiple clients you might not see it for quite a while (I ran tests for hours but the ironic thing was that the more threads I ran the less likely the problem was to occur
I will see what they make of it and re-submit if necessary when I get the Sun feedback. Not having to schedule and resit the exam (which was actually quite expensive where I am) is a big plus.
Thanks again
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic