This manual is for an old version of Hazelcast IMDG, use the latest stable version.
Chapter 14. Hibernate Second Level Cache

Chapter 14. Hibernate Second Level Cache

Hazelcast provides distributed second level cache for your Hibernate entities, collections and queries. Hazelcast has two implementations of Hibernate 2nd level cache, one for hibernate-pre-3.3 and one for hibernate-3.3.x versions. In your Hibernate configuration file (ex: hibernate.cfg.xml), add these properties;

Hazelcast creates a seperate distributed map for each Hibernate cache region. So these regions can be configured easily via Hazelcast map configuration. You can definebackup,eviction, TTL and Near Cache properties.

Hibernate has four cache concurrency strategies:read-only,read-write, nonstrict-read-write andtransactional. But Hibernate does not forces cache providers to support all strategies. And Hazelcast supports first three (read-only,read-write,nonstrict-read-write) of these four strategies. Hazelcast has not support for transactional strategy yet.

OR

And now last thing you should be aware of is to drop hazelcast-hibernate-<version>.jar into your classpath.

Additional Properties: