Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3.0
Name and version of the database you are using: N/A
Quick question....more of a sanity check really. I just started a new gig a little over a week ago. I've been plowing through the code, and wanted to triple check with you folks here (I've read the FAQ, the PDF and the book...got the same answer from all 3, but want to verify).
This project is using Hibernate without Spring (meaning no handy LocalSessionFactoryBean wired up in an app context), so they are building their SessionFactory manually in code from the Configuration. hibernate.cfg.xml lives on the classpath and has all the SessionFactory settings defined in it.
"hibernate.connection.provider_class" is not set and neither is "hibernate.connection.datasource"
A quote from the book says..."Specifying properties of the form hibernate.c3p0.* selects C3P0 as Hibernate's connection pool (you don't need any other switch to enable C3P0 support)."
Can someone please verify for me that the same is true for "hibernate.dbcp.*", or has this project been using the default connection pool, the one that is not supposed to be used in production, all along?
Code:
<hibernate-configuration>
<session-factory>
<property name="show_sql">false</property>
<property name="dialect">org.hibernate.dialect.SQLServerDialect</property>
<property name="connection.driver_class">net.sourceforge.jtds.jdbc.Driver</property>
<property name="connection.url">jdbc:jtds:sqlserver://localhost/storagemanager;SelectMethod=cursor</property>
<property name="connection.username">crosswalkapp</property>
<property name="connection.password">crosswalkapp</property>
<property name="connection.isolation">2</property>
<property name="dbcp.maxActive">20</property>
<property name="dbcp.whenExhaustedAction">1</property>
<property name="dbcp.maxWait">120000</property>
<property name="dbcp.maxIdle">10</property>
<property name="dbcp.ps.maxActive">20</property>
<property name="dbcp.ps.whenExhaustedAction">1</property>
<property name="dbcp.ps.maxWait">120000</property>
<property name="dbcp.ps.maxIdle">10</property>
<property name="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</property>
<property name="hibernate.query.substitutions">true 'Y', false 'N'</property>
<property name="hibernate.max_fetch_depth ">3</property>
<property name="hibernate.jdbc.batch_size">25</property>
<property name="jdbc.use_scrollable_resultset">false</property>
<property name="hibernate.default_batch_fetch_size">8</property>
<property name="hibernate.query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</property>
<!--
<property name="hibernate.query.factory_class">org.hibernate.hql.ast.ASTQueryTranslatorFactory</property>
-->
<property name="hibernate.cache.use_query_cache">true</property>
<!-- Mapping files -->
</session-factory>
</hibernate-configuration>