• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Passed with 152/155 (98%)

 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).]
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).]
 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jerson:
Thank for your response. very clear!
Best wish for you
xiaolin wu
 
Jerson Chua
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're welcome
 
Jerson Chua
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).]
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Jerson,
If you are still around, I would appreciate any comments on my last post.
Thanks
 
Jerson Chua
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much for your input and again congratulations.
Nate
 
Ranch Hand
Posts: 334
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
.
 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 334
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
.


 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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


 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi jerson,
i have experience in OOPs but, as i had mentioned before, not particularly in java.
thanx for your comments and suggestions.....
dhams
 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 318
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It took 10 business days before I saw my result in CertManager.
With Respect,
Matt DeLacey
 
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 1874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
great score for scjd. You must be highest. Great. All the best for the future.
Your Friendly Bartender
Shailesh.
 
Jerson Chua
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).]
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
reply
    Bookmark Topic Watch Topic
  • New Topic