• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NX:Question about lock(int recNo) in DBMain

 
HaoZhe Xu
Ranch Hand
Posts: 222
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My project is URLyBird, in the DBMain interface, there's a method lock(int recNo), and my Data.class must implements it, many people implement lock using a LockManager, I am not clear with that, but if the client needs to lock a record, it should provide the customer's ID or any other thing to identify, but the lock(recNo) only has one recNo param , so how to achieve that ?
Thank you.
 
Philippe Maquet
Bartender
Posts: 1872
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi HaoZhe,
Does your lock() method return a long cookie ?
 
HaoZhe Xu
Ranch Hand
Posts: 222
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, it doesn't, just a void
 
Bharat Ruparel
Ranch Hand
Posts: 493
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello HaoZhe,
I had the same version of URLy Bird Assignment that you had. My suggestion is that you do a search on my name "Bharat" and go through the threads that I have participated in. Andrew and Max led me through the design of the locking process which worked out very well for me since I got full points on it.
I am positive that you will find the answers to your questions and more if you take the trouble to go through the threads that I mention above. Be prepared to spend a few days looking through and thinking through them, since it took me weeks to go through the process, but I am slow to begin with and moreover I was really trying to learn this part of the assignment.
Once you have done your part, I will be happy to answer question(s) that you might have. Do me a favor and mention the thread that you might have a question on.
Hope this helps.
Regards.
Bharat
[ December 24, 2003: Message edited by: Bharat Ruparel ]
 
Philippe Maquet
Bartender
Posts: 1872
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Bharat.
HaoZhe, the Data instance itself could identify the client connection. A separate LockManager class could be a way to centralize all locking code in one place, but you don't *need* it if you locking scheme is simple.
Regards,
Phil.
[ December 24, 2003: Message edited by: Philippe Maquet ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic