-
1. Re: Is TreeCache Serializable?
manik Aug 23, 2006 7:46 AM (in response to suppyam)Odd, since the treecache is serializable. Which version of JBC are you using? A lot of people bind TreeCache to JNDI, inside JBossAS and in other app servers.
-
2. Re: Is TreeCache Serializable?
suppyam Aug 23, 2006 8:40 AM (in response to suppyam)Hi... I am using 1.4. I infact checked the API documentation, and found that in the tree structure, TreeCache does not implement Serialization. (Its been a while since I coded, so please forgive my ignorance!).
When I bind the TreeCache and use it within the app server, it works fine (i.e. I look-it-up it using a servlet). However, if I bind it using a weblogic start up class, but look-it-up in a standalone application, it throws me that exception. -
3. Re: Is TreeCache Serializable?
brian.stansberry Aug 23, 2006 11:04 AM (in response to suppyam)I'm not sure how this works in other app servers, but within JBoss AS the standard technique for binding a cache in JNDI is via JRMPProxyFactory. In that case, it's a (serializable) proxy to the cache that gets bound, not the cache itself.
TreeCache doesn't implement Serializable, so for sure some kind of proxy would be needed. -
4. Re: Is TreeCache Serializable?
suppyam Aug 24, 2006 7:15 PM (in response to suppyam)Thanks Stan! I rewrote my app to include a stateless session bean that references the TreeCache and now my app is able to access it. Was there any reason behind not making TreeCache serializable?
-
5. Re: Is TreeCache Serializable?
brian.stansberry Aug 24, 2006 8:56 PM (in response to suppyam)I wasn't around back in the early days if this was ever discussed, but IMHO it's just not doable in any kind of maintainable way. For example, a cache needs a JChannel, which is not serializable (and can't be in a meaningful way, as it has refs to sockets.)