Code:
<property name="jpaPropertyMap">
<props>
<!-- <prop key="hibernate.show_sql">true</prop> -->
<!-- <prop key="hibernate.format_sql">true</prop> -->
<!-- Cache-->
<prop key="hibernate.cache.use_second_level_cache">${hibernate.cache.use.second.level.cache}</prop>
<prop key="hibernate.cache.use_query_cache">${hibernate.cache.use.query.cache}</prop>
<prop key="hibernate.generate_statistics">${hibernate.cache.generate.statistics}</prop>
<prop key="hibernate.cache.use_structured_entries">${hibernate.cache.use.structured.entries}</prop>
<prop key="hibernate.cache.region.factory_class">net.sf.ehcache.hibernate.SingletonEhCacheRegionFactory</prop>
<prop key="hibernate.cache.provider_configuration_file_resource_path">/ehcache/ehcache.xml</prop>
is a snippet of the cache settings in the dbmsContext where all the properties are set to true so
Quote:
Did you enable second level caching for these entities ?
Yes via the ehcache.xml and correspondingly via the
Code:
@Cache(usage=CacheConcurrencyStrategy.READ_WRITE)
annotation for the domain object
In looking @ jconsole cache statistics I see the ObjectStoreMemmoryCount go up so I know these are being cached
Does it work when doing a simple load ?
I have not tried this yet since all of our results or catalog page get driven by executing against the search service, but I will write a simple load and see what I get
Did you enable Hibernate statistics ?
I am assuming you mean "hibernate.generate_statistics" and that has been set to true as in point 1.