Configuring BigMemory Go as the Second-Level Cache Provider
To configure BigMemory Go 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.