2 Replies Latest reply on Mar 28, 2019 3:10 AM by s.lisovoy

    Handling passivated class structure changes

    s.lisovoy

      Consider, I have version 1 of my application. It has a class A, that cached and then passivated to infinispan file storage.

      public class A implements Serializable {
          public SortedMap props = new TreeMap();
           ...
      }

       

      Let's suppose I'll create version 2 of my application. Class A will change it's property type to

      public class A implements Serializable {
          public Map props = new HashMap();
           ...
      }

       

      For now, loading object A from old file storage obviously falling with ClassCastException etc.

       

      So, there is my question: Does infinispan supports these changes of class structure? Can infinispan check class structure version? Can invalidate objects with old structure, for example?
      PS. Of course I can override object serialization and handle this by my own hands, but may be I miss something already existing?