Hi all folks, I've been successfully using iBatis2 for 2 years - I'll never find the right word to express my gratefulness to iBatis community to have created such a powerful tool - and I'd like now to contribute sharing with you some cache issues I've been finding. Since I already happily contributed to Apache Cocoon3, I hope I'll be able to give my contributions also to this fantastic project :)
Let me introduce the scenario: I realized a RESTful webservices using Jersey and iBatis for a customer client, who asked me to replicate the application on more than one tomcat and using a cache backend, specifically Memcached; so, I implemented a proper com.ibatis.sqlmap.engine.cache.CacheController wrapping the spy memcached client (code.google.com/p/spymemcached/). With this architecture I got 2 problems: 1) Null objects: once put the NULL_OBJECT (declared on com.ibatis.sqlmap.engine.cache.CacheModel in line 39) to Memcached, when retrieved the comparison value != NULL_OBJECT (declared on com.ibatis.sqlmap.engine.cache.CacheModel#getObject(CacheKey) line 267) doesn't work anymore because the JVM lost the reference :( I resolved by patching this class, modifying the code in this way: !NULL.equals(value) I know that in a easier scenario it is less efficent, but in that way it works for all cases. 2) Cache key generation: I found an already open issue on Jira (https://issues.apache.org/jira/browse/IBATIS-555), I got exacly the same problem because the application replication on different servers. I'd like to know exactly which objects are involved, so I'm able to patch the code. I thanks everyone can help me, I'll provide a patch on Jira as soon as I'll finish the tests. Have a nice weekend!!! Best regards, Simone -- http://www.google.com/profiles/simone.tripodi --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@ibatis.apache.org For additional commands, e-mail: dev-h...@ibatis.apache.org