• Post Reply Bookmark Topic Watch Topic
  • New Topic

Concurrent access  RSS feed

 
Adrian Yan
Ranch Hand
Posts: 688
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm done with the criteriaFind() method, now I'm working the locking and unlocking problem. I have a pretty good idea of how to implement this by using a HashSet, but I'm stuck on testing the code, especially how to simulate the concurrent access part.
Should I just create lots of threads, and use them to test the DB? If yes, how can I make sure that threads are accessing the methods at the same time? Since in the execution, every thread takes sometime to execute.
Any help is appreciated!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!