aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Passed with 152/155 (98%) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Passed with 152/155 (98%)" Watch "Passed with 152/155 (98%)" New topic
Author

Passed with 152/155 (98%)

Jerson Chua
Ranch Hand

Joined: Feb 08, 2000
Posts: 68
Hi Everybody...
I just found out that I passed the SCJD with a score of 152/155. Although, I've never posted in this list. I read the most of posts in this list and java-dev-test in yahoo groups.
I did my assignment for 3 months (2 months for implementation and 1 month for documentation) I don't have any prior background in Swing but have over a year of experience mostly on servlet, jsp, ejb, xml and jdbc. So I had to study Swing just for the certification.
Imagine how happy I am right now. I got 98% for both SCJP and SCJD. Obviously without Javaranch, I wouldn't be able to achieve this. Thank you Javaranch. Continue your good work.
I know that most people would ask these questions about my design. So here are my answers.
1. Modified the Data class
2. Didn't modify the lock and unlock signature
3. Command-line Conversion Tool
4. Used RMI
5. Extended AbstractTableModel
Thanks...
Jerson
[This message has been edited by Jerson Chua (edited May 03, 2001).]
xiaolin wu
Greenhorn

Joined: Jan 09, 2001
Posts: 11
hi, Jerson:
Congrats! I never heard anyone pass both tests with 98% before. you really did a great job! would you wind answer the following question?
I use the similar approach. question is about lock/unlock(int record) method.
why do we need them? because most method in Data obj is synchronized. if you have multiple clients and one Data obj. then
one client's access can block all other's. if you have multiple clients and multiple Data obj ( one Data obj per client) you even do not need sync.
thank you for your thought!
xiaolin
Jerson Chua
Ranch Hand

Joined: Feb 08, 2000
Posts: 68
Hi...
Here's my answer to your question.
Since performing a booking entails several method calls to the Data object, between these calls, no other threads or clients should be able to modify the record.
e.g.
try {
data.lock(recordNumber);
flight = data.getRecord(recordNumber);
// check if the record is not deleted and
// if the current available seats can
// accomodate the number of seats to be
// booked.
// if there is no locking mechanism,
// it's possible for other clients to modify
// the record, which can result to a race
// condition. For example, the available
// seats might not be able to accomodate
// number of seats to be booked but the
// the modification is still performed.
// Substract the number of seats to be
// booked in the flight.
data.modify(flight);
} catch (Exception e) {
} finally {
try {
data.unlock(recordNumber);
} catch (Exception e1) {}
}
Jerson

[This message has been edited by Jerson Chua (edited May 03, 2001).]
krishna anand
Ranch Hand

Joined: Jan 21, 2001
Posts: 61

Hi Jerson
Congrats on your passing SCJD with 98% .It is a great achievement
passing both SCJD & SCJP with 98% .
Wishing you all the success in your profession and future .
Regards
------------------
Krishna


Krishna
Nathan Daniels
Greenhorn

Joined: May 03, 2001
Posts: 21
Jerson,
Congratulations on your awesome score.
I was just wondering how you handled client disconnections. Did you use Thread or unreferenced interface?
xiaolin wu
Greenhorn

Joined: Jan 09, 2001
Posts: 11
Jerson:
Thank for your response. very clear!
Best wish for you
xiaolin wu
Jerson Chua
Ranch Hand

Joined: Feb 08, 2000
Posts: 68
You're welcome
Jerson Chua
Ranch Hand

Joined: Feb 08, 2000
Posts: 68
Hi Nathan...
I didn't use the unreferenced interface. If the client failed to connect to the remote object/server (RemoteException), the user is offered with an option if he/she want to reconnect. Reconnection is performed by just re-looking up the remote object.
Jerson
Nathan Daniels
Greenhorn

Joined: May 03, 2001
Posts: 21
Thanks for the information, Jerson. But, I guess what I was trying to ask was if a client disconnected and was holding record locks, how did you handle that case? Since you didn't use unreferenced, you must have used a thread that was checking for locks that was held over a certain time limit. Am I correct? If that is so, how did you justify using time outs?

Jerson Chua
Ranch Hand

Joined: Feb 08, 2000
Posts: 68
I implemented a thread which periodically checks for record locks that have been held for more than a certain length of time and releases those record locks.
In my documentation, I didn't justify the timeout used by the thread.
Nathan Daniels
Greenhorn

Joined: May 03, 2001
Posts: 21
Thanks again, Jerson. I just have a couple more questions, if you don't mind. Did you use WeakReference for your locking thread or just removed the timed out locks from the iterator?
Did you implement the server with the activation framework? Or did you make it so the user would have to start the server first and that server would be running all the time (remote mode)? As far as the gui, how simple did you keep it (how many windows)?
By the way, thank you for taking the time to answer my questions.
I have the server side pretty much done, and I just started looking at UI. Being new to Swing, it is taking me a little while to get started, hence my question on the GUI. I don't know how elaborate we have to get (menu, toolbars, etc...) Hope you can give some guidance.
Thanks again,
Nathan
[This message has been edited by Nathan Daniels (edited May 09, 2001).]
[This message has been edited by Nathan Daniels (edited May 09, 2001).]
paul lea
Greenhorn

Joined: Feb 20, 2001
Posts: 1

Hi Jerson,
Congratulations, that's a great mark!
Can I ask, since you didn't change the lock and unlock signatures, did you identify the client who made the lock and store this, or did you just make the presumption that it is up to the client to make sure that he has locked the record before attempting to modify?
Thanks,
Paul.
Jerson Chua
Ranch Hand

Joined: Feb 08, 2000
Posts: 68
Yes, the Data class keeps track of the current owner of the lock. Note that you don't necessarily need to change the signature of the lock and unlock method to identify the client.
cheers...
Jerson
Nathan Daniels
Greenhorn

Joined: May 03, 2001
Posts: 21
Hey Jerson,
If you are still around, I would appreciate any comments on my last post.
Thanks
Jerson Chua
Ranch Hand

Joined: Feb 08, 2000
Posts: 68
Did you use WeakReference for your locking thread or just removed the timed out locks from the iterator?
Nope, I didn't use WeakReference. I think you can't use WeakReference because the owner of the lock is a remote client.
Did you implement the server with the activation framework? Or did you make it so the user would have to start the server first and that server would be running all the time (remote mode)?
Nope... the server is running all the time.
As far as the gui, how simple did you keep it (how many windows)?
Try to check the Java Look and Feel Guideline. I didn't read the whole document. Observe the examples.

Try to provide only what the instruction is asking for.
Nathan Daniels
Greenhorn

Joined: May 03, 2001
Posts: 21
Thank you very much for your input and again congratulations.
Nate
ruilin yang
Ranch Hand

Joined: Feb 25, 2001
Posts: 334
Jerson,
Congradulation for your great achievement.
Please comments on my following view.
For the two operation modes: local and remote, it seems to me we do not need go through any interface for local access. In local access, I would just initiate a Data class object locally that conduct the data access operation. you can even use a different name from the network data class. In this way I will not need any class wrapper.
Then the remote access will go through a interface interface according to RMI protocol.
Thanks.
Ruilin
.
Lisa Foster
Ranch Hand

Joined: Feb 28, 2001
Posts: 116
In the Lock and Unlock methods in Data Class do we them Blank What I mean should we add code to the methods or leave them as is??
Thanks Lisa
ruilin yang
Ranch Hand

Joined: Feb 25, 2001
Posts: 334
Lisa,
If you extend the data class you can leave as it is (do nothing methods).
If you modify data class you will put you codes for those method implementation in the body of those methods.
regards,
Ruilin
Jerson Chua
Ranch Hand

Joined: Feb 08, 2000
Posts: 68
Yes, you can do that. Actually in my assignment I did implement a wrapper class for the local mode so I would have a common interface for both local and remote mode. There's no absolute answer to your question. It depends on how you justify your design.
Good luck...
Jerson
Originally posted by ruilin yang:
Jerson,
Congradulation for your great achievement.
Please comments on my following view.
For the two operation modes: local and remote, it seems to me we do not need go through any interface for local access. In local access, I would just initiate a Data class object locally that conduct the data access operation. you can even use a different name from the network data class. In this way I will not need any class wrapper.
Then the remote access will go through a interface interface according to RMI protocol.
Thanks.
Ruilin
.

dhams des
Greenhorn

Joined: Nov 23, 2000
Posts: 6
hi jerson,
firstly, congratulations
secondly, i am a sun certified programmer and i want to go for the developer certification asap. have downloaded the assignment but have no clue as to where to start. could you please give me pointers ?
fyi, i am a software developer but do not have any experience in java, JSPs etc.
thanx alot in advance
dhams
Jerson Chua
Ranch Hand

Joined: Feb 08, 2000
Posts: 68
This is the order on how I implemented my assignment.
1. Deprecated Methods
2. Data Conversion Tool (if you have the old assignment)
3. Locking Mechanism
4. Server
5. Data Client
6. GUI
Originally posted by dhams des:
hi jerson,
firstly, congratulations
secondly, i am a sun certified programmer and i want to go for the developer certification asap. have downloaded the assignment but have no clue as to where to start. could you please give me pointers ?
fyi, i am a software developer but do not have any experience in java, JSPs etc.
thanx alot in advance
dhams

dhams des
Greenhorn

Joined: Nov 23, 2000
Posts: 6
hi jerson,
thanx for your response. do you think i should read a particular book before i even start coding ?
dhams

Originally posted by Jerson Chua:
This is the order on how I implemented my assignment.
1. Deprecated Methods
2. Data Conversion Tool (if you have the old assignment)
3. Locking Mechanism
4. Server
5. Data Client
6. GUI

Jerson Chua
Ranch Hand

Joined: Feb 08, 2000
Posts: 68
It depends on how much knowledge you have in Java and Object-Oriented Design. In my case, I just read some articles in Javaworld on Swing and even without the certification, I've been reading alot of articles in java.sun.com and javaworld. Both these sites have great collection of tips and tutorial.
Jerson
Originally posted by dhams des:
hi jerson,
thanx for your response. do you think i should read a particular book before i even start coding ?
dhams


Dave Boden
Ranch Hand

Joined: Nov 08, 2000
Posts: 37
Hi,
>Note that you don't necessarily need to change the signature of >the lock and unlock method to identify the client.
Just wondering how?!
I came up with a solution trying to identify the Thread that the request was running on. Unfortunately, RMI doesn't associate a unique client with a unique thread. Are you using a different approach?
Cheers,
Dave
Jerson Chua
Ranch Hand

Joined: Feb 08, 2000
Posts: 68
I implemented a singleton class that returns the identity of the client. In this case, you don't need to modify the signature of the lock and unlock method.
The underlying implementation of getting the client identity in that class would depend on your design on how you propagate the client identity to the server.
Jerson
Originally posted by Dave Boden:
Hi,
>Note that you don't necessarily need to change the signature of >the lock and unlock method to identify the client.
Just wondering how?!
I came up with a solution trying to identify the Thread that the request was running on. Unfortunately, RMI doesn't associate a unique client with a unique thread. Are you using a different approach?
Cheers,
Dave

dhams des
Greenhorn

Joined: Nov 23, 2000
Posts: 6
hi jerson,
i have experience in OOPs but, as i had mentioned before, not particularly in java.
thanx for your comments and suggestions.....
dhams
Alex Zhang
Ranch Hand

Joined: Apr 19, 2001
Posts: 68
Excuse me, I have just submitted my project.
I would like to know for how long you have waited to know your result from Sun?
Thx
Matt DeLacey
Ranch Hand

Joined: Oct 12, 2000
Posts: 318
It took 10 business days before I saw my result in CertManager.
With Respect,
Matt DeLacey
Vivek Viswanathan
Ranch Hand

Joined: Mar 03, 2001
Posts: 350
Congradulations
I did not use java ranch for Developer, but i am now using it for SCEA, your marks are really amazing
Congradulations again
Vivek


Vivek Viswanathan SCJP 1.2, SCJP 1.6,SCJD,SCEA,SCWCD,IBM-484,IBM-486,IBM-141,Ms.NET C# 70-316,SCMAD, LPIC-I
shailesh sonavadekar
Ranch Hand

Joined: Oct 12, 2000
Posts: 1874
great score for scjd. You must be highest. Great. All the best for the future.
Your Friendly Bartender
Shailesh.
Jerson Chua
Ranch Hand

Joined: Feb 08, 2000
Posts: 68
Thanks...
No that's not that highest score. Actually, one of my colleagues and some people in java-dev-test got 153/155
Originally posted by shailesh sonavadekar:
great score for scjd. You must be highest. Great. All the best for the future.
Your Friendly Bartender
Shailesh.

Nathan Daniels
Greenhorn

Joined: May 03, 2001
Posts: 21
Jerson,
Did you notify the client that was holding the lock that it was being released. Did you throw some sort of exception?
What would happen if that client was not notified that he lost the lock? Wouldn't he continue with his operation? Can you tell me your approach to this situation? By the way, where did you lose points?
Originally posted by Jerson Chua:
I implemented a thread which periodically checks for record locks that have been held for more than a certain length of time and releases those record locks.
In my documentation, I didn't justify the timeout used by the thread.


[This message has been edited by Nathan Daniels (edited May 25, 2001).]
Marre Mask
Greenhorn

Joined: May 04, 2001
Posts: 19
I have a question concerning the assignment. Do you have save information in the db on who is regestering the seats,or is it enough to just descrease the number of seats available on every registration?
Thanks in advance.
Rick Fortier
Ranch Hand

Joined: Jun 04, 2001
Posts: 147
Marre Mask -
There is no requirement as to who made the request. You would have to create a different database in order to implement that.
Brandon W
Greenhorn

Joined: Jan 22, 2002
Posts: 10
Maybe I asked the following question?
1) booking seat is the only area need to be locked, while just reading the database for updating the JTable don't need to have locking.
2) Thread is only created when for booking seat
Many thanks for your help.
Brandon
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17260
    
    6

Um Brandon, I would post that as a new thread. This thread is almost a year old, and the posters here are probably not around anymore.
1. That is correct
2. You don't need to start your own threads.
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
 
subject: Passed with 152/155 (98%)