• 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

some questions during design,any reply is appreciated

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
a,do i need to add "sychronized" to bookseat() function as i had lockmanager to implements lock/unlock?
b,all the other function in remote interface which try to modify recodes should be add lock/unlock,such as in modify(){
lock();
localdb.modify
unlock
}?
c,how many remote database object i need build for client?each client got one remote db object or just one for all remote clients?
 
Ranch Hand
Posts: 560
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
a) If multiple clients call bookseat() method, then you need to synchronize it.
b) lock() is something you need to outside of modify(). No need to add lock() in the modify() method
c) What do you mean by remote db object? I suggest you have a unique remote DataRemote instance. DataRemote class implements the interface which is also implemented by the Data class.
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"RobinLin"-
Welcome to the JavaRanch! Please adjust your displayed name to meet the
JavaRanch Naming Policy.
You can change it
here.
I am pretty sure that that is probably your first and last name, and will just need to seperate the two.
Thanks! and welcome to the JavaRanch!
Mark
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic