Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tomcat JDBC connection pool VS c3p0 Connection pool [closed]

I recently came across this connection pool implementation.

http://people.apache.org/~fhanik/jdbc-pool/jdbc-pool.html

I find it quite interesting.

Did anyone try this out? I think it looks great except the fact that it does not support automatic retry and statement cache like c3p0.

Does anyone one know how it compares to c3p0?

Till now I used c3p0 but I find it's connection handling in a multi-thread environment problematic. It opens way too much connections compared to number of application threads.

Thanks.

like image 974
YaOg Avatar asked Jan 23 '11 13:01

YaOg


People also ask

What is Tomcat JDBC connection pool?

Tomcat jdbc pool implements the ability retrieve a connection asynchronously, without adding additional threads to the library itself. Tomcat jdbc pool is a Tomcat module, it depends on Tomcat JULI, a simplified logging framework used in Tomcat. Retrieve the underlying connection using the javax. sql.

Which is the best connection pooling in Java?

There are multiple JDBC frameworks for connection pooling the most popular choices being Tomcat JDBC and HikariCP.

Which is best connection pool for hibernate?

The default connection pool in hibernate is c3p0 named after the star wars character. But hibernate supports also proxool and used to also advertise apache dbcp. For a while DBCP was dormant and fell out of grace. C3P0 is actually used in production in many projects.

Which feature of Tomcat connection pool is used for asynchronous connection retrieval?

The Tomcat JDBC connection pool supports asynchronous connection retrieval without adding additional threads to the pool library. It does this by adding a method to the data source called Future<Connection> getConnectionAsync() .


1 Answers

I've used it in one of my projects and it works great.

I can think of only one online article which compares Tomcat pool to C3P0: tomcatexpert.com. The C3P0 benches are however pretty off, their excuse was that they couldn't configure it to its max on Tomcat.

I'd say, for the most reliable data, just give it a try and bench yourself. I did and it satisfied me.

See also:

  • Connection pooling options with JDBC
like image 115
BalusC Avatar answered Oct 05 '22 03:10

BalusC