BigMemory Max 4.3.4 | Product Documentation | BigMemory Max Integrations | Using BigMemory Max with Hibernate | Configuring BigMemory Max as the Second-Level Cache Provider
 
Configuring BigMemory Max as the Second-Level Cache Provider
To configure BigMemory Max as a Hibernate second-level cache, set the region factory property to one of the following in the Hibernate configuration. The Hibernate configuration is specified either by hibernate.cfg.xml, hibernate.properties or Spring. The format shown below is for hibernate.cfg.xml.
Hibernate 3.3 (and later 3.x versions)
For instance creation, use:
<property name="hibernate.cache.region.factory_class">
net.sf.ehcache.hibernate.EhCacheRegionFactory</property>
To force Hibernate to use a singleton of Ehcache CacheManager, use:
<property name="hibernate.cache.region.factory_class">
net.sf.ehcache.hibernate.SingletonEhCacheRegionFactory</property>
Hibernate 4.x
For Hibernate 4, use org.hibernate.cache.ehcache.EhCacheRegionFactory instead of net.sf.ehcache.hibernate.EhCacheRegionFactory, or org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory instead of net.sf.ehcache.hibernate.SingletonEhCacheRegionFactory.

Copyright © 2010 - 2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.