3 Replies Latest reply on Oct 13, 2005 3:06 PM by stemeyda

    TreeCacheAop not persisting results to all cache references

    vasagotempest2

      Hello,

      I'm currently using TreeCacheAop to persist simple mappings of a unique String to a custom object...

      cache.put("/root", "uniqueId", myObj);


      I retrieve these with a seperate JVM's instance of the cache, (using TreeCacheAop's create()) and call setter methods on the custom object...

      ((MyObject)cache.get("/root", "uniqueId")).set("newvalue")


      The original instance does not get updated... I can add more objects in either JVM and both JVMs see the new objects, and I can remove objects, but I just can't change the value of fields in these objects and have those changes persisted to both instances....

      Q: What's in the jboss-aop.xml configuration?

      A: jboss-aop.xml is needed for POJO instrumentation. In jboss-aop.xml, you can declare your POJO (e.g., Person) to be "prepared", a JBOssAop term to denote that the object will be "aspectized" by the system. After this declaration, JBossAop will invoke any interceptor that associates with this POJO. TreeCacheAop will dynamically add an org.jboss.cache.aop.CacheInterceptor to this POJO to perform object mapping and relationship management.

      Note that to add your POJO, you should declare all the fields to be "prepared" as in the example.


      I'm supposing I need to perform "aspectizing" on my custom object...

      Any suggestions?