ItEr60S12MellorasGlobalesRendementoItEr59S22: Configure Hibernate second level cache.

It is left disabled by default, it has to be enabled in the file navalplanner-business-hibernate.cfg.xml.
This commit is contained in:
Jacobo Aragunde Pérez 2010-07-09 13:58:12 +02:00 committed by Javier Moran Rua
parent 6ce60c81f4
commit b40d6678e3
6 changed files with 46 additions and 0 deletions

View file

@ -108,5 +108,9 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
</dependency>
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache</artifactId>
</dependency>
</dependencies>
</project>

View file

@ -0,0 +1,16 @@
<ehcache>
<!-- Uncomment the next line if you want to enable
overflowToDisk (only recommended when the DB server
is in a different machine)
<diskStore path="java.io.tmpdir"/>
-->
<defaultCache
maxElementsInMemory="1000"
eternal="false"
timeToIdleSeconds="120"
timeToLiveSeconds="120"
overflowToDisk="false"
/>
</ehcache>

View file

@ -9,5 +9,12 @@
<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>
<!-- Configure second level cache -->
<property name="hibernate.cache.provider_class">net.sf.ehcache.hibernate.EhCacheProvider</property>
<property name="hibernate.cache.use_second_level_cache">false</property>
<property name="hibernate.cache.use_query_cache">false</property>
<property name="hibernate.cache.provider_configuration_file_resource_path">classpath:ehcache.xml</property>
</session-factory>
</hibernate-configuration>

View file

@ -8,5 +8,12 @@
<property name="hibernate.format_sql">true</property>
<property name="hibernate.use_sql_comments">true</property>
<property name="hibernate.hbm2ddl.auto">create</property>
<!-- Configure second level cache -->
<property name="hibernate.cache.provider_class">net.sf.ehcache.hibernate.EhCacheProvider</property>
<property name="hibernate.cache.use_second_level_cache">false</property>
<property name="hibernate.cache.use_query_cache">false</property>
<property name="hibernate.cache.provider_configuration_file_resource_path">classpath:ehcache.xml</property>
</session-factory>
</hibernate-configuration>

View file

@ -8,5 +8,12 @@
<property name="hibernate.format_sql">true</property>
<property name="hibernate.use_sql_comments">true</property>
<property name="hibernate.hbm2ddl.auto">create</property>
<!-- Configure second level cache -->
<property name="hibernate.cache.provider_class">net.sf.ehcache.hibernate.EhCacheProvider</property>
<property name="hibernate.cache.use_second_level_cache">false</property>
<property name="hibernate.cache.use_query_cache">false</property>
<property name="hibernate.cache.provider_configuration_file_resource_path">classpath:ehcache.xml</property>
</session-factory>
</hibernate-configuration>

View file

@ -554,6 +554,11 @@
<artifactId>timelinez</artifactId>
<version>1.2_1</version>
</dependency>
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache</artifactId>
<version>1.6.2</version>
</dependency>
</dependencies>
</dependencyManagement>