Transparently caching others' data
Another very popularly used framework is Hibernate, which is used as an Object Relational Mapper (ORM) layer and is traditionally used to translate objects to and from a relational database table. While this goes against the distributed data philosophy that we have been exploring with Hazelcast, we may have a legacy application that is currently using it. By adding a caching layer, we can improve the scalability and performance of this application. However, by enabling this cache layer, we will be introducing a data consistency issue; to avoid this, we would need an intelligent distributed cache, exactly like Hazelcast.
To enable the use of the cache layer, we must again include the appropriate library. This slightly varies depending on what version of Hibernate we are using, but depending on our version of Hibernate, we need to add a hazelcast-hibernate(3/4)-3.5.jar
extension to the classpath. Additionally, we need to turn on Hibernate's second-level caching...