hibernate/hibernate-orm — pull request #820 by thelateperseus (2014-10-01 00:30:42+00:00)
Title: Ensure that CacheKey is serializable across JVMs for entities with a composite primary key

The Infinispan L2 cache serializes the `CacheKey` instance and sends that to other nodes in the cluster to invalidate cache entries. The `CacheKey` implements `Serializable`, but it is not always actually serializable. When the `CacheKey` represents a composite primary key, the `type` variable is set to an instance of `EmbeddedComponentType`, which indirectly references `SessionFactoryImpl`. While `SessionFactoryImpl` is serializable within a JVM, it is not serializable across JVMs.