Skip to content

Commit

Permalink
KNL-1572 Load caches for hibernate. (sakaiproject#5056)
Browse files Browse the repository at this point in the history
It appears that Hibernate is starting before the MemoryService and as a result it’s configuring the EhCache CacheManager singleton. This results in it using an empty config instead of the config containing our hibernate caches.
  • Loading branch information
buckett authored and ern committed Dec 1, 2017
1 parent e09428d commit 96c255d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -339,14 +339,14 @@
It is important that the cache timeout of the underlying cache implementation be set to a
higher value than the timeouts of any of the query caches. In fact, it is recommended that
the the underlying cache not be configured for expiry at all. -->
<cache name="org.hibernate.cache.UpdateTimestampsCache"
<cache name="org.hibernate.cache.spi.UpdateTimestampsCache"
maxElementsInMemory="6000"
eternal="true"
statistics="true"
overflowToDisk="false" />

<!-- this cache stores the actual objects pulled out of the DB by hibernate -->
<cache name="org.hibernate.cache.StandardQueryCache"
<cache name="org.hibernate.cache.internal.StandardQueryCache"
maxElementsInMemory="12000"
eternal="false"
timeToIdleSeconds="600"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@
<prop key="hibernate.hbm2ddl.auto">${hibernate.hbm2ddl.auto}</prop>
<prop key="hibernate.generate_statistics">true</prop>
<prop key="hibernate.enable_lazy_load_no_trans">true</prop>
<prop key="net.sf.ehcache.configurationResourceName">/org/sakaiproject/memory/api/ehcache.xml</prop>
</props>
</property>
</bean>
Expand Down

0 comments on commit 96c255d

Please sign in to comment.