Ehcache 2.10.5 | Related Documentation | Integrations | Using Ehcache with Hibernate | Upgrading from Ehcache Versions Prior to 2.0
 
Upgrading from Ehcache Versions Prior to 2.0
This topic contains notes about upgrading from versions of Ehcache prior to 2.0.
Support for Hibernate 3.3 SPI
Beginning with Ehcache 2.0, there is support for the Hibernate 3.3 SPI implementation. This is important because Hibernate 3.3 has an updated caching SPI. Although still present in 3.3, the Hibernate 3.2 caching SPI has been deprecated.
Support for Hibernate 3.5 SPI
The SPI further changes in Hibernate 3.5. The Ehcache 2.0 implementation is forward-compatible with Hibernate 3.5.
Backward Compatibility
The EhCacheProvider class, which implements the 3.2 API, is provided for backward compatibility. Anyone already using Ehcache with Hibernate will be using this version. We encourage you to upgrade to the new class, net.sf.ehcache.hibernate.EhCacheRegionFactory, in preparation for when Hibernate drops support for the old SPI. In recognition of this, we have marked net.sf.ehcache.hibernate.EhCacheProvider as deprecated. The new cache region factory takes advantage of the new SPI to provide higher performance. The old SPI had heavy synchronization to ensure all of the different caching providers were thread-safe. The new SPI leaves that to the implementer. Ehcache does not require extra synchronization, so this overhead is avoided.
Unification with Terracotta's Hibernate 3.2 Provider
In September 2009, Terracotta released its Hibernate Caching Provider which was set as follows:
<property name="hibernate.cache.provider_class">
org.terracotta.hibernate.TerracottaHibernateCacheProvider</property>
It featured high performance clustered Hibernate caching using the Terracotta Server Array. The new 3.3 EhCacheRegionFactory replaces the Terracotta Hibernate Cache Provider as well as the old Ehcache provider. It is superset of the two earlier factories and also implements the new SPI. The earlier Hibernate provider also required a Java agent, which is no longer required in the new provider. We recommend that existing Terracotta Hibernate users upgrade to the Ehcache 2.0 provider.

Copyright © 2010-2018 | 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.
Innovation Release