c3p0 « Library « Java Enterprise Q&A





1. What is the benefit of Connection and Statement Pooling?    stackoverflow.com

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 ...

2. Lock Ordering in C3p0    stackoverflow.com

I am trying to log the creation and destruction of database connections in our application using c3p0's ConnectionCustomizer. In it, I have some code that looks like this: log(C3P0Registry.getPooledDataSources()) I'm running into ...

3. c3p0 connection management problems    stackoverflow.com

I'm using Spring 3.0.2, Hibernate 3.5.0 and c3p0 0.9.1.2 and I'm having a ton of errors when it comes down to retrieving connections and commiting transactions. Here's my configuration of c3p0:

<bean ...

4. should i activate c3p0 statement pooling?    stackoverflow.com

we are running java6/hibernate/c3p0/postgresql stack. Our JDBC Driver is 8.4-701.jdbc3 I have a few questions about Prepared Statements. I have read excellent document about Prepared Statements But i still have a question ...

5. how do I turn off logging in java c3p0 connection pooling lib?    stackoverflow.com

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 ...

6. C3P0 apparent deadlock when the threads are all empty?    stackoverflow.com

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  - com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@43502400 -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned ...

7. choose a db connection pool    stackoverflow.com

we want to use a db connection pool in our applicationl,however thear are so many open soure pools,like dbcp,c3p0,proxool and etc. I have no idea which is better,any one have some experience ...

8. Getting errors when building C3p0 from source    stackoverflow.com

I downloaded the source (v 0.9.1.2) and tried building it, first from command line and then inside an IDE. I think the problem is setting classpath in the build.properties file. Here is ...

9. can not retrieve data from sql server    stackoverflow.com

I can not retrieve data from db in sql server. I use the c3p0 as the pool,this is the c3p0.properties:

c3p0.user=test
c3p0.password=123456
c3p0.jdbcUrl=jdbc:sqlserver://xxxxxx:1433;databaseName=TIMDB;SelectMethod=cursor
c3p0.driverClass=com.microsoft.sqlserver.jdbc.SQLServerDriver
c3p0.maxPoolSize=15
c3p0.testConnectionOnCheckin=true
c3p0.idleConnectionTestPeriod=3600
In the sql server,I have create a new user named test,and its default ...





10. how to return a connection in c3p0    stackoverflow.com

I am using c3p0 - ComboPooledDataSource. I am initializing once as below.

private void init() {
cpds = new ComboPooledDataSource();
cpds.setDriverClass(driverName);
cpds.setJdbcUrl(url);
cpds.setUser(userName);
cpds.setPassword(pwd);
}
I am getting a connection from the pool as below
public synchronized Connection getLocalConnection(String ipAddr)
 ...

11. Can I disable c3p0 from logging to System.err?    stackoverflow.com

According to the c3p0 documentation, you can manually specify where logs should go, whether through JDK 1.4 logging, Log4j, or through System.out. I'm running SLF4J, so I've included org.slf4j.jul-to-slf4j ...

12. Unable to locate c3p0 logging messages    stackoverflow.com

Up until recently, we created a new database connection for every query. Each query is setup using connection.prepareStatement(query) and we were able to log these queries to our logger (java.util.logging) with ...

13. c3p0 ComboPooledDataSource report largest pool size?    stackoverflow.com

I'm implementing some runtime reporting for my web app, which is using c3p0's ComboPooledDataSource. I'm wondering if there's a way to programmatically get the largest number of connections that have ...

14. C3PO commits after timeout?    stackoverflow.com

I'm making some tests with c3po. I'm using unreturnedConnectionTimeout property because I want c3po to rollback long running transactions. The problem is that c3po commits after timeout occurs and then destroys ...

15. Min_Size for c3p0    stackoverflow.com

I'm developing a web app (3-tier). I'm currently using Hibernate as ORM and C3P0 as connection pooling mechanism. Browsing through the properties of C3P0, it looks like: Min_size: Minimum number of ...

16. Postgresql with c3p0 - failover    stackoverflow.com

We're using currently c3p0 with postgresql. Does c3p0 supports any fail-over mechanisms (no info in documentation so I assume that unfortunately no)? I've found that mysql,oracle and ms sql supports some ...





17. How to redirect c3p0 log messages to my application log file    stackoverflow.com

I have a standalone java application. I have decided to use c3p0 for connection pooling. Currently I am using java.util.logging.Logger for logging application messages. jdk1.6 is being used. All the application ...