1 Reply Latest reply on Jun 4, 2008 1:46 AM by jasonhu919

    Combination of @Replicable withSerializable in the POJO Cach

    kringdahl

      We have a multiple node cache set up with a JDBC cache loader configured. Our objects stored in the POJO cache need to be Serializable in order to be persisted to the secondary store since the secondary store could be remote (right?). However, we want to take advantage of the partial object replication as well. This works on the whole except for objects that have collections as properties. Something like this:

      MyObject myObj = (MyObject) cache.find("myObj");
      myObj.getMyList().add(anotherListItem);

      This will update the object in the local cache, but not in any other cache nodes and also not in the cache loader. It appears that it is treating the collection portion of the object as Serializable only and not intercepting modifications to the List. The combination of Serializable and @Replicable is not really covered in the POJO cache docs. Do we need to always call attach() when we update a collection inside of an object that implements Serializable even if it is annotated with @Replicable?

      Environment: JBoss 4.2.2.GA with JBoss Cache 2.0.0.GA

      Thanks,
      Ken