• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

some questions during design,any reply is appreciated

 
Robin Lin
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • 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?
 
Sai Prasad
Ranch Hand
Posts: 560
  • Mark post as helpful
  • send pies
  • 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.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic