• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DB Interface implementation

 
anthony chan
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,

In the DB interface that provided by the instruction. The explaination of method "lock" said "Locks a record so that it can only be updated or deleted by this client." Does the record mean one record in the data file or it means the data file. Since I know how to lock the data file, but I don't have any idea to lock one record inside the data file.

Thanks
anthony chan
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Anthony,

I guess you should just lock that record, not the complete data file. So your program should deal with following sequence without any problems:

So while client1 holds the lock on record1, client2 is able to update the record on which it owns the lock.

Kind regards,
Roel
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic