jQuery in Action, 3rd edition
The moose likes JDBC and Relational Databases and the fly likes a database aware query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "a database aware query" Watch "a database aware query" New topic

a database aware query

Brusk Baran
Ranch Hand

Joined: Nov 15, 2001
Posts: 132
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

Joined: Oct 29, 2001
Posts: 9189

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.

[How To Ask Questions On JavaRanch]
I agree. Here's the link: http://aspose.com/file-tools
subject: a database aware query
jQuery in Action, 3rd edition