CacheKey is not serializable across JVM instances

Description

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.

This causes the following marshalling error in Infinispan:

Environment

Infinispan L2 cache

Status

Assignee

Gail Badner

Reporter

Nathan Clement

Fix versions

None

Labels

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure