Coherence Hibernate 2.1.1 Released

Gunnar Hillert
Oracle Coherence
Published in
3 min readJan 21, 2022

The Oracle Coherence team proudly announces the release of Coherence Hibernate 2.1.1. This is the first release of the 2.1.x line of releases.

Kaipalaoa Landing in Hilo, Hawai’i. Black sands beach. Waves of the ocean rolling in. Blue sky with a few faint clouds.
Kaipalaoa Landing in Hilo, Hawai’i.

Hibernate 5.6.x Support

This release now adds support for the Hibernate 5.6.x second-level cache (2LC) SPI. This new module also covers Hibernate versions 5.3.x 5.4.x and 5.5.x. This module takes advantage of Coherence’s new Bootstrap API and adds a few new Coherence-specific Hibernate properties, allowing you to specify the name of the configured Coherence session and the type of your session, e.g. Client (Coherence*Extend) or Server (Coherence cluster member). Using the Bootstrap API also provides better integration support for dependency injection frameworks. We added a constructor to the CoherenceRegionFactory which now also optionally accepts a pre-existing Coherence session. This feature is useful in cases where you not only want to use Coherence as part of the Hibernate second-level cache SPI but want to use Oracle Coherence for other use-cases in your application. This module should also more easily integrate into the logging facilities of your applications by defaulting the Coherence logger to SLF4J (Simple Logging Facade for Java). Of course you can still set the logger to any of the Coherence supported loggers.

Coherence System Property Overrides

The aforementioned log configuration options are part of the new ability to specify any Coherence System Property Overrides via Hibernate properties:

com.oracle.coherence.hibernate.cache.coherence_properties.*=property value

Customize the CacheKeysFactory

We have added support for configurable CacheKeysFactories. By default, Coherence Hibernate uses the DefaultCacheKeysFactory but you can now also customize the used CacheKeysFactory using the Hibernate property:

  • hibernate.cache.keys_factory

This property accepts the following values:

  • default, which wraps identifiers in the tuple (DefaultCacheKeysFactory)
  • simple, uses identifiers as keys without any wrapping (SimpleCacheKeysFactory)
  • fully qualified class name that implements org.hibernate.cache.spi.CacheKeysFactory

New Documentation Website

Coherence Hibernate now follows the other Coherence community projects by using AsciiDoc-based documentation. For this we have converted the old Coherence Hibernate website to the Coherence CE theme that you can find here. Lastly, we now also publish basic aggregated JavaDoc to the website.

New Sample Apps

As part of this release we have added the Coherence Hibernate Demo as a new sample application, including documentation.

While not strictly part of this release, please also check out the relevant sample apps that are part of the Coherence Spring repository. It currently contains the following Hibernate-specific examples:

This sample app provide additional guidance on how to integration Coherence Hibernate with the Spring ecosystem.

Contribute to Coherence Hibernate!

As always, we would love to hear from you! Please take Coherence Hibernate and Coherence CE for a spin! If you have questions, please join our Slack channel or ask questions on Stack Overflow. If you see missing features or if you have any other suggestions for improvement please contact us, e.g. via Twitter @OracleCoherence or feel free to file a GitHub issue. Contributions are always welcome!

--

--

Gunnar Hillert
Oracle Coherence

Consulting Member of Technical Staff at Oracle for the Coherence team. Java Champion, former Spring team member, OSS committer, DevNexus co-founder.