0 Replies Latest reply on Mar 3, 2014 7:15 AM by Stanislav Ivanov

    Force Infinispan to skip restoring classes from disk to cache, if serialized classes have old serialVersionUID

    Stanislav Ivanov Newbie

      Hi, everyone!

      I'm trying to provide my application with mechanism to cache some classes. One important requirement is that instances of these classes should survive JVM restart, so I use cache with disk persistence.


      I'm relying on standart Java Serialization. I have explicit serialVersionUID, which I'm planning to update when structure of the class changes.

      The problem is that with current behaviour, when I change serialVersionUID and restore cache from disk, Infinispan simply initialize new fields with nulls.

      Can I change this behaviour? Can I force Infinispan to skip loading instances of the class to cache, if serialVersionUID does not match?

      Is desirable behaviour achieveable without creating custom Externalizer?


      Thanks in advance!


      I use Infinispan 6.0.0.Final and JDK 1.7_45