• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connection Pool

 
wasif akbar
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am currently working on an application that requires the creation of a Database Connection Pool class. The problem is that I haven't created such a class before and I can't seem to find any sound documentation outlining guidelines on what is required or used to create a connection pool. Could you guys either provide a sample class or point to some documentation that would help out.
Thanks in advance,
Wasif Akbar
 
Praveen Balaji
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
wasif..
contact me off line :
praveen.balaji@iflexsolutions.com
i wrote a small conection pooling class for myself. This one supports multiple drivers and multiple database connecitons.
-praveen.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
or you could do a search...
I'm pretty sure Javaworld has an article on Object pooling.
Dave
 
Praveen Balaji
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah.. it's pretty much object pooling.. except if you want something special done!!
for example, I have a cleaner thread that runs and cleans the connection pool at regular intervals. Such things!!
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With all due respect, few home-grown connection pools are worth the disk space they occupy, and building your own connection pool is just about as useful as trying to patent a circular device facilitating horizontal transport of goods and persons (unless you're Australian, that is). (Praveen, I'm not implying anything specific about your pool, as I don't know it).
Try the Struts GenericDataSource class. A robust connection pool that turns any old JDBC driver into an industry-standard DataSource, so that you can simply replace it by a "native" DataSource if you get a driver or deploy in an environment that has one available, now that makes solid sense. Proprietary pools don't. Much less writing your own proprietary pool.
- Peter
[This message has been edited by Peter den Haan (edited November 02, 2001).]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic