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 Java 8 in Action this week in the Java 8 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: 8713
    
    6

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]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: a database aware query
 
Similar Threads
How to improve performance.....
Null and Blank in Database
Cloudscape
Servlets - dynamic query
integrating iReport with my JSP Project