• Post Reply Bookmark Topic Watch Topic
  • New Topic

threada dealing db  RSS feed

 
mohamed hamdy
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi'
in my graduation project ( file sharing ) i had an
idea for searching the database at the server by one connection in a database manager thread which
manage accessing of the database by the other threads .
for searching i intended to pick a result set that multiple threads deals with one ofter the other in a way that all threads extracts the same record and when they all finished the result set goes to the following record and the data base manager thread counts the accessor threads and when they're gone away it permits any incoming thread to open new result set .
what's about the performance of this idea ( that use synchronization with flags ) versus permits one thread at a time deals thae database and no other thread can access the database befor the old one finished.
,thanks in advance
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand what problem you try to solve - why don't you just let several threads access the database concurrently?
 
mohamed hamdy
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi ilja,
i posted in the JDBC forum befor regarding this matter look at my post here
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!