2 Replies Latest reply on Apr 8, 2008 10:29 AM by jason.greene

    pojoCache.find(fqn) always returns a proxy class object ( AO

      pojoCache.find("list") returns a proxy class object ( AOPClassProxy0 ) for list objects.

      This class has a member varialbe namely - org.jboss.cache.pojo.interceptors.dynamic.CachedListInterceptor which is not serializable.

      We are writing this data ( proxy class object ) to a Queue, and when its trying to serialize, its throwing following exception,

      java.io.NotSerializableException: org.jboss.cache.pojo.interceptors.dynamic.CachedListInterceptor
      at java.io.ObjectOutputStream.writeObject0(Ljava.lang.Object;Z)V(Unknown Source)
      at java.io.ObjectOutputStream.writeObject(Ljava.lang.Object;)V(Unknown Source)
      at java.util.ArrayList.writeObject(ArrayList.java:569)


      Is there any API to get the original list object instead of proxy class object. Currently we have a work around for this,

      Object obj = pojoCache.detach("list");
      pojoCache.attach("list");
      return obj;

      but above workaround is not recommended, since it is very time consuming as it obtains write locks on the nodes.