• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

a database aware query

 
Brusk Baran
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would like to create a query that will read the username and passwords and also the user groups of around 200 people; in a static method, so that I will not be required to make a connection to the database for each coming login/password check.
But still stays a problem, during the time the database might change, maybe a user is canceled etc. I want my results also to be synchronized with the database. What is the way to achieve such a goal? any idea? does jdbc supply such an API?
 
Joe Ess
Bartender
Posts: 9312
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It would probably make more sense to leave your user data in the database so you don't have to worry about synchronization problems and use a connection pool to mitigate your connection creation expenses. Do a search on this forum for "connection pool". There's a couple topics a day.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic