1 Reply Latest reply on Apr 10, 2008 12:00 PM by Jason Greene

    how a list in pojo can aop?

    w j Newbie

      hi all,i've followed the user-guide to use pojo cache,i've got some problem:
      when i attached a list direct to the cache,then i used cache.find("list") to get the list, it worked fine, in the eclipse debug view,i can see it is a aoplist,
      but when i create a javabean and set a list to the javabean,then i use bean.getList(),the list i got is not a aoplist,how can i do now?thks,the follow is the program:
      //i use spring bean ,the follow is done in the manager's init-method
      List listCache = new ArrayList();
      this.cache.attach("/listCache", listCache);

      Person p = new Person();
      List us = new ArrayList();
      us.add(new User());
      p.setUsers(us);
      this.cache.attach("/person", p);
      us = p.getUsers();
      us.add(new Object());

      //then i done follow in client method
      List listCache = cacheManager.getListCache();
      //getListCache use cache.find("/listCache")
      //listCache is a aopList
      listCache.add(u);


      Person p = cacheManager.getPerson();
      //getPerson use cache.find("/person")
      List us = p.getUsers();
      //us is not a aopList ,either Person use @Replicable or not
      us.add(u);