I'm trying to implement an application session cache using TreeCacheAop. I've had some problems with Stackoverflows that have now been resolved by using JBoss-AOP 1.1, but now that I'm able to put things into the cache I'm having some problems.
Mostly the application willl communicate internally using local ejb interfaces and the session objects will not normally be serialized, but we expect there to be some remote Java clients, and currently the test case is using a remote interface, and when it tries to retrieve a newly session it fails because it can't be serialized:
Caused by: java.io.NotSerializableException: org.jboss.cache.aop.CachedMapInterceptor
You will need to substitue a non-aspectized class in this case. When you use Collection classes under cach aop, it returns a proxy to the Collection (in this case CacheMapInterceptor).
But the proxy is not Serializable because it will need to access the cache store internally. So remoting won't make sense. (At least for now. :-)