Best configuration of c3p0 [closed]

This is a configuration I am using which keeps resources to a minimum. Of course you’ll want to tailor your application to use the resources it needs… Reference: http://www.mchange.com/projects/c3p0/index.html testConnectionOnCheckin validates the connection when it is returned to the pool. testConnectionOnCheckOut, although would ensure active connections before use, would be too expensive to do. idleConnectionTestPeriod … Read more

how do I turn off logging in java c3p0 connection pooling lib?

For those who are NOT using a configuration file, just to add the following in the code, before loading the connection pool. Properties p = new Properties(System.getProperties()); p.put(“com.mchange.v2.log.MLog”, “com.mchange.v2.log.FallbackMLog”); p.put(“com.mchange.v2.log.FallbackMLog.DEFAULT_CUTOFF_LEVEL”, “OFF”); // Off or any other level System.setProperties(p);

Spring JDBC connection pool best practices

C3PO and DBCP development have stalled mostly because they are mature. I have seen both of these drivers be able to support hundreds of transactions per second. The Tomcat pool is a reworked & updated DBCP driver. MyBatis 3.0 also contains it’s own pooling implementation which, based on code inspection, seems solid. Finally, there’s BoneCP … Read more

What are the required C3P0 settings for hibernate in order to avoid Deadlocks

Actually this is probably too late, but the problem is quite simple: hibernate.c3p0.idle_test_periods must not be higher than hibernate.c3p0.timeout or connections closed by the database will not be properly detected. Moreover, the deadlock detection warnings look like some part of your code is not properly returning the connections to the pool (i.e. session.close()) The MysqlIO … Read more

Connection pooling options with JDBC: DBCP vs C3P0 [closed]

DBCP is out of date and not production grade. Some time back we conducted an in-house analysis of the two, creating a test fixture which generated load and concurrency against the two to assess their suitability under real life conditions. DBCP consistently generated exceptions into our test application and struggled to reach levels of performance … Read more