• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

DataBase lock

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

when I will update the record I need to verify if nobody is reading or deleting it... the same as when I will delete a record: I need to verify if it is already in update request or read, so I calls the wait() method....

My question is:
When a client ask to read a record I need to verify if someone is locking this record in delete or updating request, if so I call wait method.... but if has someone reading this record too, I need to permit this two threads could read the record as the same time??? or make that only one thread can access record even if has only one thread reading and this new Thread wants to read to too, the second thread should wait the first finish read until starts???


I hope you have understand my question.... if i'm not clear you sayed me then I explain again....

Thanks
 
reply
    Bookmark Topic Watch Topic
  • New Topic