I dropped c3p0 jars in my WEB-INF/lib....
I only see this in the logs(And I turned up to FINEST at one point...simply no logging on how hibernate is loading the pools)...
FINE: ResourceBundle ValidatorMessages not found in Validator classloader. Delegate to org.hibernate.validator.resources.DefaultValidatorMessages
Mar 4, 2010 10:31:34 AM org.hibernate.validator.ClassValidator getDefaultResourceBundle
FINE: ResourceBundle ValidatorMessages not found in Validator classloader. Delegate to org.hibernate.validator.resources.DefaultValidatorMessages
Mar 4, 2010 10:31:35 AM org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: Using Hibernate built-in connection pool (not for production use!)
Mar 4, 2010 10:31:35 AM org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: Hibernate connection pool size: 20
Mar 4, 2010 10:31:35 AM org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: autocommit mode: true
and I have this in my persistence.xml file...
Code:
<persistence 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"
version="1.0">
<!-- This should be named oracle to let every app use it
not be named webrates... -->
<persistence-unit name="xcoreNonJtaOracle">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<properties>
<property name="hibernate.hbm2ddl.auto" value="validate"/>
<property name="hibernate.default_schema" value="VOICELOG"/>
<property name="hibernate.c3p0.min_size" value="5"/>
<property name="hibernate.c3p0.max_size" value="21"/>
<property name="hibernate.c3p0.timeout" value="5001"/>
<property name="hibernate.c3p0.max_statements" value="51"/>
<property name="hibernate.c3p0.idle_test_period" value="60001"/>
<property name="transaction.flush_before_completion" value="true"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
<property name="hibernate.connection.driver_class" value="net.sf.log4jdbc.DriverSpy"/>
<property name="hibernate.connection.username" value="vl_user"/>
<property name="hibernate.connection.password" value="vluser01"/>
<property name="hibernate.connection.url" value="jdbc:log4jdbc:oracle:thin:@10.10.250.120:1521:ractest"/>
<!--property name="hibernate.connection.url" value="jdbc:log4jdbc:oracle:thin:@192.168.140.45:1521:codev01"/-->
<property name="hibernate.show_sql" value="false"/>
<property name="hibernate.format_sql" value="true"/>
<property name="hibernate.order_updates" value="true"/>
<property name="hibernate.default_batch_fetch_size" value="100"/>
<property name="hibernate.jdbc.batch_versioned_data" value="true"/>
<property name="hibernate.jdbc.use_streams_for_binary" value="true"/>
<property name="hibernate.cache.region_prefix" value="hibernate.test"/>
<property name="hibernate.cache.use_query_cache" value="true"/>
<property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
<property name="hibernate.query.substitutions" value="true 1, false 0, yes 'Y', no 'N'"/>
</properties>
</persistence-unit>
<persistence-unit name="xcoreNonJta">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<properties>
<property name="hibernate.hbm2ddl.auto" value="update"/>
<property name="hibernate.default_schema" value="VOICELOG"/>
<property name="hibernate.c3p0.min_size" value="5"/>
<property name="hibernate.c3p0.max_size" value="21"/>
<property name="hibernate.c3p0.timeout" value="5001"/>
<property name="hibernate.c3p0.max_statements" value="51"/>
<property name="hibernate.c3p0.idle_test_period" value="60001"/>
<property name="transaction.flush_before_completion" value="true"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>
<property name="hibernate.connection.driver_class" value="net.sf.log4jdbc.DriverSpy"/>
<property name="hibernate.connection.username" value="application"/>
<property name="hibernate.connection.password" value="application123"/>
<property name="hibernate.connection.url" value="jdbc:log4jdbc:postgresql://localhost/agent"/>
<property name="hibernate.max_fetch_depth" value="3"/>
<property name="hibernate.show_sql" value="false"/>
<property name="hibernate.format_sql" value="true"/>
<property name="hibernate.order_updates" value="true"/>
<property name="hibernate.default_batch_fetch_size" value="100"/>
<property name="hibernate.jdbc.batch_versioned_data" value="true"/>
<property name="hibernate.jdbc.use_streams_for_binary" value="true"/>
<property name="hibernate.cache.region_prefix" value="hibernate.test"/>
<property name="hibernate.cache.use_query_cache" value="true"/>
<property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
<property name="hibernate.query.substitutions" value="true 1, false 0, yes 'Y', no 'N'"/>
</properties>
</persistence-unit>
</persistence>
Why is hibernate using it's connection pool instead of c3p0?
thanks,
Dean