aspose file tools*
The moose likes JDBC and the fly likes Connection Pool Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Connection Pool" Watch "Connection Pool" New topic
Author

Connection Pool

wasif akbar
Greenhorn

Joined: May 02, 2001
Posts: 11
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

Joined: Jun 17, 2001
Posts: 60
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

Joined: Mar 06, 2001
Posts: 13459

or you could do a search...
I'm pretty sure Javaworld has an article on Object pooling.
Dave
Praveen Balaji
Ranch Hand

Joined: Jun 17, 2001
Posts: 60
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

Joined: Apr 20, 2000
Posts: 3252
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).]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connection Pool