Hi Micheal, Congratulations for such a good score.I feel happy about that. I have a doubt regarding the implementation of lock an unlock 1. Which datastructure did you use to store which locks have been implemented 2.Did you create your own lock object to store the lock information or just stored the recordnumber. 3.Didyou change the method signature of the lock and unlock to identify the client who has locked or how did you go about this 4.Did you implement any timeout mechanism??? I think you will answer all my questions becoz currently i am heldup with the locking Thanx inadvance Lokesh
Michael Lang
Greenhorn
Joined: Apr 30, 2001
Posts: 11
posted
0
The implementation of the Lock and unlock method is one the most popular topic in this discussion board. Partly because there are a lot of ways to implement them. To tell the truth, I don't know what is the best design. Just like you, I doubt my design too, I still do. If your design works for you, it should be OK. As to your question: 1. I used a Collection. 2. I just store record number. 3. I didn't try to identify clients. 4. I didn't implement timeout. I saw other passed SCJDs who did exactly the opposite. Good luck!
lokesh ks
Greenhorn
Joined: Apr 29, 2001
Posts: 5
posted
0
Thanks for your reply micheal. Your reply has helped me a lot. After reading your reply ,I think that we should keep our code and logic as simple as possible but meet the specifications. And should not oveer do the project(meaning going out of the system boundaries ). And finally we should be able to justify whatever we have done . what do you think?? Your inputs may help me in completing the project asap... ANd one final question which collection did you use was it a map or any other like list. I am thinking of having a list rather than map.... Thanx for your replies once again...........