Announcing Hazelcast Hibernate 2.1.0
Today, we’re happy to announce the new version of our hazelcast-hibernate53 integration providing the second-level cache provider implementation for Hibernate 5.4.
Besides various bug fixes and performance improvements, we introduced a few highly-requested features.
New Features
Asynchronous Client Reconnect with Fallback
In order to increase resiliency, whenever a connection between a client and a server is lost, the second-level cache is bypassed until the connection gets established again. At the same time, the client tries to reconnect asynchronously to a cluster which can be configured using multiple parameters. If you want to switch back to the previous behaviour (blocking client operations), you can achieve this using a new fallback configuration property. However, asynchronous reconnect with fallback is treated as a reasonable default setting.
Nonfunctional Improvements
We managed to save one extra network trip when putting entries into a cache. Extended Hibernate statistics are now much lighter since they rely on Hazelcast’s LocalMapStats and don’t aggregate data manually. Whenever a local cache gets shut down, it also unregisters an IMDG topic listener preventing a tiny memory leak.
New Configuration Properties
- cleanup_delay – the duration of physical local cache cleanups
- cluster_timeout – after how many milliseconds the client should stop retrying to establish a cluster connection
- initial_backoff – initial backoff value after failed connection attempt in milliseconds
- backoff_multiplier – a multiplier used to derive a new backoff value if the connection fails after the previous attempt
- max_backoff – maximum possible backoff value
- fallback – if Hibernate should fall back onto the original datasource when Hazelcast cluster is not accessible
Compatibility with Previous Hibernate Versions
Besides hazelcast-hibernate53, we also released artifacts providing support for older Hibernate 5 versions.
- If you need Hibernate 5.3.x or 5.4.x support, choose hazelcast-hibernate53
- If you need Hibernate 5.2.x support, choose hazelcast-hibernate52
- If you need Hibernate 5.1.x or 5.0.x support, choose hazelcast-hibernate5
Examples
If you want to see how to integrate it with a Spring Boot application, you can use this guide as a reference.