Questions tagged [c3p0]

c3p0 is a Java library for JDBC drivers with JNDI-bindable DataSources, including DataSources that implement Connection and Statement Pooling, as described by the jdbc3 spec and jdbc2 std extension.

C3p0

C3p0 is an easy-to-use library for augmenting traditional (DriverManager-based) JDBC drivers with JNDI-bindable DataSources, including DataSources that implement Connection and Statement Pooling, as described by the jdbc3 spec and jdbc2 std extension.

A common use case for c3p0 is to replace the standard DBCP connection pooling included with Apache Tomcat. Often times, a programmer will run into a situation where connections are not correctly recycled in the DBCP connection pool and c3p0 is a valuable replacement in this case.

References

1148 questions
326
votes
15 answers

Connection pooling options with JDBC: DBCP vs C3P0

What is the best connection pooling library available for Java/JDBC? I'm considering the 2 main candidates (free / open-source): Apache DBCP - http://commons.apache.org/dbcp/ C3P0 - http://sourceforge.net/projects/c3p0 I've read a lot about them…
Dema
  • 6,867
  • 11
  • 40
  • 48
71
votes
4 answers

Java JDBC connection pool library choice in 2011/2012?

Which JDBC connection pool library should I use for a new application project (not web application)? Apache DBCP has enough unresolved issues which are pushed until 2.0 I think. C3P0 development seems to be stopped. And both of them looks…
Vladislav Rastrusny
  • 29,378
  • 23
  • 95
  • 156
62
votes
5 answers

Spring Data JPA - "could not initialize proxy - no Session" - With Methods marked as transactional

I have a model that has a pretty large graph of sub entities and hibernate ends up making around 9 statements to lazily fetch all of the data needed but about 4 levels deep I get a "could not initialize proxy - no Session" error and I am not sure…
douglasrlee
  • 663
  • 1
  • 5
  • 7
49
votes
6 answers

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

I use Hibernate together with MySQL 5.1.30. I have the next libraries: c3p0-0.0.1.2.jar mysql-connector-java-5.0.3-bin.jar hibernate3.jar I use a hibernate.cfg.xml for configuration:
Sergio del Amo
  • 76,835
  • 68
  • 152
  • 179
44
votes
4 answers

Spring JDBC connection pool best practices

I have a basic Spring JDBC application with a pretty basic configuration:
Luciano Fiandesio
  • 10,037
  • 10
  • 48
  • 56
39
votes
7 answers

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

hey all, I'm just getting started with c3p0 for database connection pooling. It's attaching itself to my log4j output currently. How do I set logging off or at least to SEVERE level only for c3p0? I tried tweaking the properties file but not sure…
James
  • 15,085
  • 25
  • 83
  • 120
39
votes
2 answers

Best configuration of c3p0

I'm struggling with a problem facing c3p0 configuration. I posted a question last week
Babak Behzadi
  • 1,236
  • 2
  • 16
  • 33
33
votes
2 answers

Manage Connection Pooling in multi-tenant web app with Spring, Hibernate and C3P0

I'm trying to setup a multi-tenant web application, with (ideally) possibility for both Database-separated and Schema-separated approach at the same time. Although I'm going to start with Schema separation. We're currently using: Spring…
Khosrow
  • 556
  • 1
  • 6
  • 16
32
votes
2 answers

hibernate connection pool

I can't seem to get hibernate to use c3p0 for connection pooling, it says 12:30:35,038 INFO DriverManagerConnectionProvider:64 - Using Hibernate built-in connection pool (not for production use!) 12:30:35,038 INFO…
user217631
  • 1,278
  • 5
  • 18
  • 33
31
votes
4 answers

JDBC Connection pooling using C3P0

Following is my helper class to get DB connection: I've used the C3P0 connection pooling as described here. public class DBConnection { private static DataSource dataSource; private static final String DRIVER_NAME; private static final…
jai
  • 21,519
  • 31
  • 89
  • 120
30
votes
11 answers

C3P0 apparent deadlock when the threads are all empty?

I'm using C3P0 as a connection pool in Tomcat, and I'm seeing very worrying errors: 2010-09-16 13:25:00,160 [Timer-0] WARN com.mchange.v2.async.ThreadPoolAsynchronousRunner -…
Steven Schlansker
  • 37,580
  • 14
  • 81
  • 100
30
votes
6 answers

How good is Oracle Universal Connection Pool (UCP)

Does anybody have experience with using Oracle UCP under real production load? Does it handle database reconnects well? Are there any multi-threading issues? Has anybody compared it with C3P0 or Apache DBCP?
25
votes
5 answers

What is the benefit of Connection and Statement Pooling?

Can someone explain what is Connection and Statement Pooling and what is the benefit over unpooled DataSources? I am trying to understand when it is a good idea to use a technology like c3p0 or proxool in a project. I need first to understand what…
user56642
  • 301
  • 1
  • 4
  • 6
23
votes
7 answers

Hibernate not releasing connections from connection pool

I'm creating an application with Hibernate JPA and I use c3p0 for connection pooling with MySQL. I have an issue with the number of connections to the MySQL database as it hits the 152 opened connections, this is not wanted since I define in my c3p0…
Reda
  • 287
  • 2
  • 8
  • 21
22
votes
6 answers

Java Database connection pool (BoneCP vs DBPool vs c3p0)

For a Java app outside of a J2EE container, which connection pool library is the best? I heard c3p0 is getting outdated. Jakarta's common pool library is no longer under development Therefore I'm left with BoneCP and DBPool. From what I can tell…
Stephane Grenier
  • 15,527
  • 38
  • 117
  • 192
1
2 3
76 77