From: Julien V. <ju...@jb...> - 2006-05-21 22:47:27
|
User: julien Date: 06/05/21 18:47:23 Modified: core/src/resources/portal-core-sar/conf/hibernate/portal hibernate.cfg.xml Added: core/src/resources/portal-core-sar/conf/hibernate/portal ehcache.xml Log: JBPORTAL-878 : Explicit ehcache configuration for hibernate Revision Changes Path 1.3 +1 -0 jboss-portal/core/src/resources/portal-core-sar/conf/hibernate/portal/hibernate.cfg.xml (In the diff below, changes in quantity of whitespace are not shown.) Index: hibernate.cfg.xml =================================================================== RCS file: /cvsroot/jboss/jboss-portal/core/src/resources/portal-core-sar/conf/hibernate/portal/hibernate.cfg.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- hibernate.cfg.xml 18 Nov 2005 18:43:02 -0000 1.2 +++ hibernate.cfg.xml 21 May 2006 22:47:23 -0000 1.3 @@ -8,6 +8,7 @@ <property name="show_sql">@portal.sql.show@</property> <property name="cache.provider_class">org.hibernate.cache.EhCacheProvider</property> <property name="cache.use_query_cache">true</property> + <property name="cache.provider_configuration_file_resource_path">conf/hibernate/portal/ehcache.xml</property> <!-- Force the dialect instead of using autodetection --> <!-- 1.1 date: 2006/05/21 22:47:23; author: julien; state: Exp;jboss-portal/core/src/resources/portal-core-sar/conf/hibernate/portal/ehcache.xml Index: ehcache.xml =================================================================== <ehcache> <!-- Sets the path to the directory where cache .data files are created. If the path is a Java System Property it is replaced by its value in the running VM. The following properties are translated: user.home - User's home directory user.dir - User's current working directory java.io.tmpdir - Default temp file path --> <diskStore path="java.io.tmpdir/portal"/> <!--Default Cache configuration. These will applied to caches programmatically created through the CacheManager. The following attributes are required for defaultCache: maxInMemory - Sets the maximum number of objects that will be created in memory eternal - Sets whether elements are eternal. If eternal, timeouts are ignored and the element is never expired. timeToIdleSeconds - Sets the time to idle for an element before it expires. Is only used if the element is not eternal. Idle time is now - last accessed time timeToLiveSeconds - Sets the time to live for an element before it expires. Is only used if the element is not eternal. TTL is now - creation time overflowToDisk - Sets whether elements can overflow to disk when the in-memory cache has reached the maxInMemory limit. --> <defaultCache maxElementsInMemory="10000" eternal="false" timeToIdleSeconds="120" timeToLiveSeconds="120" overflowToDisk="false" /> </ehcache> |