File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connection Pooling

 
J Craig
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When using a datasource is it best to have one class that does all database access or is it best to have a seperate object for each type of request to database(update,delete,etc).
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33713
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's mostly a matter of personal preference. I like to have one class for each query or update with the common connection stuff in a superclass. That way the database classes don't get huge. If you only have a couple queries, it probably doesn't matter either way.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic