TASKPM/libreplan-business/src/main/resources/libreplan-business-hibernate.cfg.xml

35 lines
1.8 KiB
XML
Raw Normal View History

<!DOCTYPE hibernate-configuration
PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
2009-05-14 18:04:26 +02:00
<hibernate-configuration>
<session-factory>
<property name="hibernate.dialect">${hibernate.dialect}</property>
<property name="hibernate.show_sql">${hibernate.show_sql}</property>
<property name="hibernate.format_sql">${hibernate.format_sql}</property>
<property name="hibernate.use_sql_comments">${hibernate.use_sql_comments}</property>
<property name="hibernate.hbm2ddl.auto">${hibernate.hbm2ddl.auto}</property>
<!-- If you want to measure/tune Hibernate performance, use this flag -->
<!-- <property name="hibernate.generate_statistics">true</property> -->
<!--
We explicitly call validation, otherwise infinite loops can happen.
Sometimes DAOs are queried when validating some constraints.
When the DAO does a query, the pending changes are flushed, causing the validations to be run again.
2014-05-01 16:36:02 +02:00
-->
<property name="javax.persistence.validation.mode">none</property>
2014-05-01 16:36:02 +02:00
<property name="jadira.usertype.autoRegisterUserTypes">false</property>
2014-05-01 16:36:02 +02:00
<property name="jadira.usertype.databaseZone">jvm</property>
<property name="jadira.usertype.javaZone">jvm</property>
<!-- Configure second level cache -->
2014-05-01 16:36:02 +02:00
<property name="hibernate.cache.region.factory_class">org.hibernate.cache.ehcache.EhCacheRegionFactory</property>
<property name="hibernate.cache.use_second_level_cache">true</property>
<property name="hibernate.cache.use_query_cache">false</property>
<property name="hibernate.cache.provider_configuration_file_resource_path">classpath:ehcache.xml</property>
2009-05-14 18:04:26 +02:00
</session-factory>
</hibernate-configuration>