hazelcast/hazelcast — pull request #2621 by bturner (2014-06-05 06:55:25+00:00)
Title: Add support for Hibernate 4.2/4.3.

- Updated Hibernate dependency to 4.2
- Since all interaction with CacheEntry in the 4.1 case is done via Reflection, the exact version of the dependency doesn't matter to the (newly renamed) Hibernate41CacheEntrySerializer
- On the other hand, updating the dependency allows the 4.2/4.3 version of the serializer to use the CacheEntry interface directly
- Created Hibernate42CacheEntrySerializer to serialize CacheEntry instances using the interface methods without Reflection
- StandardCacheEntryImpl instances are still constructed using Reflection because the pre-computed constructor is package-private
- Updated Hibernate4CacheEntrySerializerHook to return a different serializer depending on whether CacheEntry is a class or interface

As an additional thing, updated HazelcastCacheRegionFactory to implement
the org.hibernate.cache.spi.RegionFactory interface rather than the
deprecated org.hibernate.cache.RegionFactory interface.

- The spi.RegionFactory variant was added in Hibernate 4.0, so, since HazelcastCacheRegionFactory is specific to the Hibernate 4 support, there is no reason to implement the deprecated interface