• 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

DataBase Locking

 
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,
How to do database locking. What does it mean how to achive it.
-rameshkumar.
 
Ramesh kumaar
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there any one to help me.
-rameshkumar
 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
When your application is running in remote mode it has the potential to be accessed by more than 1 client, when this happens you would need to deal with concurrency issues. You will need a mechanism that controls access to sensitive data, the db.db file in this case. One of the ways in which this can be achieved is by using the wait and notify(All) methods declared in the Object class. The use of these methods needs to be accompanied by the use of the 'synchronized' keyword. We have been provided with empty lock and unlock methods, where you decide to put these methods and how you decide to implement them is a choice that you will have to make.
Some people have implemented these methods in the Data class and some have implemented them in a LockManager. I'm sure that there are other ways and places that they can be implemented, but these seem to be the most common ones.
I hope this helps you.
Regards,
Chiji
 
Nothing? Or something? Like this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic