[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-4156) c3p0 is not used when only specific hibernate.c3p0.* properties

Strong Liu (JIRA) noreply at atlassian.com
Tue Jun 29 03:41:10 EDT 2010


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Strong Liu updated HHH-4156:
----------------------------

          Description: 
in hibernate document, it says:
{quote}
C3P0 is an open source JDBC connection pool distributed along with Hibernate in the lib directory. Hibernate will use its org.hibernate.connection.C3P0ConnectionProvider for connection pooling if you set hibernate.c3p0.* properties.
{quote}

but this is not working anymore, if you not explicitly add this property:
<property name="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>

  was:
I was using hibernate-entitymanager 3.2.6.GA and c3p0 well, but I cannot run c3p0 with hibernate-entitymanager 3.4.0.GA. c3p0 is never called!!!

Below, follows persistence.xml, maven dependencies working with hibernate-entitymanager 3.2.6.GA, maven dependencies not woking with hibernate-entitymanager 3.4.0.GA

persistence.xml:

<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
  <persistence-unit name="SystemDDD" transaction-type="RESOURCE_LOCAL">
    <provider>org.hibernate.ejb.HibernatePersistence</provider>
    <properties>
      <!-- Connection properties -->
      <property name="hibernate.connection.username" value="DDD"/>
      <property name="hibernate.connection.password" value="DDD"/>
      <property name="hibernate.default_schema" value="DDD"/>
      <property name="hibernate.connection.url" value="jdbc:oracle:thin:@//YYY:1521/ZZZ"/>
      <property name="hibernate.connection.driver_class" value="oracle.jdbc.OracleDriver"/>
      <property name="hibernate.dialect" value="org.hibernate.dialect.OracleDialect"/>
      <!-- Connection pooling properties -->
      <property name="hibernate.c3p0.min_size" value="1"/>
      <property name="hibernate.c3p0.max_size" value="10"/>
      <property name="hibernate.c3p0.timeout" value="5000"/>
      <property name="hibernate.c3p0.max_statements" value="50"/>
      <property name="hibernate.c3p0.idle_test_period" value="60000"/>
      <!-- Cache properties -->
      <property name="hibernate.cache.use_second_level_cache" value="true"/>
      <property name="hibernate.cache.provider_class" value="org.hibernate.cache.EhCacheProvider"/>
      <!-- Other properties -->
      <property name="hibernate.show_sql" value="true"/>
      <property name="hibernate.format_sql" value="true"/>
      <property name="hibernate.archive.autodetection" value="class, hbm"/>
      <property name="hibernate.hbm2ddl.auto" value="none"/>
    </properties>
  </persistence-unit>
</persistence>


maven dependencies working with hibernate-entitymanager 3.2.6.GA

        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
            <version>3.3.2.GA</version>
            <type>jar</type>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>c3p0</groupId>
            <artifactId>c3p0</artifactId>
            <version>0.9.1.2</version>
            <type>jar</type>
            <scope>compile</scope>
        </dependency>


maven dependencies not woking with hibernate-entitymanager 3.4.0.GA
       
     <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
            <version>3.4.0.GA</version>
            <type>jar</type>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-ehcache</artifactId>
            <version>3.3.0.SP1</version>
            <type>jar</type>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.5.2</version>
            <type>jar</type>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-c3p0</artifactId>
            <version>3.3.0.SP1</version>
            <type>jar</type>
            <scope>runtime</scope>
        </dependency>


What is wrong or missing?

    Affects Version/s: 3.5.3
        Fix Version/s: 3.6
                       3.5.x
          Component/s:     (was: entity-manager)
                       core
          Environment:     (was: windows xp sp2; java sun 1.6.0_10; tomcat 6.0.18; maven 2.0.9)
              Summary: c3p0 is not used when only specific hibernate.c3p0.* properties  (was: c3p0 not working with hibernate-entitymanager 3.4.0.GA)

> c3p0 is not used when only specific hibernate.c3p0.* properties
> ---------------------------------------------------------------
>
>                 Key: HHH-4156
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4156
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.5.3
>            Reporter: Marcelo Romulo Fernandes
>            Assignee: Strong Liu
>            Priority: Minor
>             Fix For: 3.5.x, 3.6
>
>
> in hibernate document, it says:
> {quote}
> C3P0 is an open source JDBC connection pool distributed along with Hibernate in the lib directory. Hibernate will use its org.hibernate.connection.C3P0ConnectionProvider for connection pooling if you set hibernate.c3p0.* properties.
> {quote}
> but this is not working anymore, if you not explicitly add this property:
> <property name="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>

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