This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JDBC and the fly likes Connection pool  -  Own implementation / DBCP / c3p0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Connection pool  -  Own implementation / DBCP / c3p0" Watch "Connection pool  -  Own implementation / DBCP / c3p0" New topic
Author

Connection pool - Own implementation / DBCP / c3p0

kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1372
We have our own connection pool implementation. I am thinking of implementing connection pool using DBCP / C3P0. Can we get better performance using DBCP / c3p0 than our own connection pool implementation ?
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30356
    
150

kri shan wrote: Can we get better performance using DBCP / c3p0 than our own connection pool implementation ?

Probably. Your implementation is highly unlikely to be optimized (or bug free for that matter.)
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3704
    
    5

This falls under the category of 'reinventing the wheel'. There are people spending a lot of time and energy building things like database connection pools and unless you have a strong belief these implementations are flawed, better to use their work.

Reminds me of an old programmer adage... "Good programmers write good code, great programmers steal good code. "


My Blog: Down Home Country Coding with Scott Selikoff
Wallace Wadge
Greenhorn

Joined: Nov 02, 2009
Posts: 1
kri shan wrote:We have our own connection pool implementation. I am thinking of implementing connection pool using DBCP / C3P0. Can we get better performance using DBCP / c3p0 than our own connection pool implementation ?


You might want to have a look at BoneCP - according to my benchmarks, available on the site, it's faster than both C3P0 and DBCP.

Disclaimer: I'm the author so I can't be unbiased

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connection pool - Own implementation / DBCP / c3p0