• Post Reply Bookmark Topic Watch Topic
  • New Topic

what to synchronized ?

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.
assume that I have one database server, and many swing desktop clients
connected to that server (I don't want to use a server btw the database
and the swing apps).
now, these swing apps may add values or update some values (when the user
click on a jbutton).
the question is, where to put the synchronize keyword in my application ?
 
Catalin Merfu
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I assume each Swing client opens only one connection to the database.
If you don't use the database connection in multiple threads you don't have to synchronize.
 
Joe Nguyen
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can set synchronization on db server by setting transaction to TRANSACTION_READ_COMMITTED to avoid race condition.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!