aspose file tools*
The moose likes JDBC and the fly likes a database aware query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "a database aware query" Watch "a database aware query" New topic
Author

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
Bartender

Joined: Oct 29, 2001
Posts: 8927
    
    9

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.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
Consider Paul's rocket mass heater.
 
subject: a database aware query