[hibernate-issues] [Hibernate-JIRA] Created: (HHH-3759) c3p0 not starting with v3.3.1

Mark Strecker (JIRA) noreply at atlassian.com
Fri Feb 6 10:20:38 EST 2009


c3p0 not starting with v3.3.1
-----------------------------

                 Key: HHH-3759
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3759
             Project: Hibernate Core
          Issue Type: Bug
          Components: core
    Affects Versions: 3.3.1
         Environment: 3.3.1GA
MySQL 5.0.45
            Reporter: Mark Strecker


Using the hibernate.c3p0.* properties in the hibernate.cfg.xml file used to start c3p0 but now the built-in connection pool is used instead.

You can set : <property name="connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
to work around this, but this is not necessary in 3.2.5GA and before. This also isn't documented anywhere and I fortunately found it in the forum.

Here is an example section in the hibernate.cfg.xml
  <property name="hibernate.c3p0.acquire_increment">1</property> 
  <property name="hibernate.c3p0.idle_test_period">100</property> <!-- seconds --> 
  <property name="hibernate.c3p0.max_size">100</property> 
  <property name="hibernate.c3p0.max_statements">0</property> 
  <property name="hibernate.c3p0.min_size">1</property> 
  <property name="hibernate.c3p0.timeout">100</property> <!-- seconds -->

We discovered this while upgrading from 3.2.5GA to 3.3.1GA when the connections on our test server started getting JDBC Connection errors because MySQL kills them after 8 hours of inactivity.

This can be verified by turning on hibernate info logging and examining the log.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list