c3p0

Problem with C3P0 connection pooling in ServletListenerContext when deploying to Tomcat 6

Hello there, first things first: I've read various related questions on here, before actually deciding to enter my question anyway. The reason is that my problem is somewhat different from the others I've read about. My aim: I have an application written in GWT (I'll explain later why it's relevant) that access some servlet via RPC. Th...

Something wrong with Hibernate DB connection pooler c3p0

since last post, did all the changes suggested but this problem still haunts me. Here's the error i get: Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 44,499,102 milliseconds ago. here's my hibernate.cfg.xml <?xml version='1.0' encoding='utf-8'?> <!DOCTYP...

JPA (and/or Hibernate) - How to set timeout threshold for connection and/or query?

I'm trying to figure out how to configure my project such that JPA will timeout and throw an exception after a configured amount of time. There are two situations where I would like this to happen: When JPA is unable to even connect to the database When a JPA query takes longer than the timeout threshold to return a result set I'm no...

C3p0 connection pooling for jpa in persistence.xml not working?

I'm still getting JDBC timeouts after trying to configure c3p0 following all of the examples I could find. I'm using JPA, Hibernate, Tomcat, MySQL [AWS RDS]. Here's the snippet from persistence.xml: <property name="javax.persistence.jdbc.url" value="jdbc:mysql://url..." /> <property name="javax.persistence.jdbc.driver" value="com.mysql....

Best way to debug MySQL connections that are being closed on me after ~39 minutes?

I have hibernate 3.3, c3p0, MySql 5.1, and Spring. The MySQL connections in my service calls are consistently being closed after ~39 minutes. The natural running time of my service call is on the order of ~5 hours. I've tried changing various c3p0 config, etc, to avoid the 39 minute cap. No luck. Is there a more direct, systematic wa...