• Post Reply Bookmark Topic Watch Topic
  • New Topic

Connection pool - Own implementation / DBCP / c3p0

 
kri shan
Ranch Hand
Posts: 1486
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Sheriff
Posts: 36032
432
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author
Bartender
Posts: 4033
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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. "
 
Wallace Wadge
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!