I just tried that and it seems to work, I will do further testing. (It be nice to use main trunk and not my fork).

I propose a documentation patch (pg45 bottom):
   Before:
Read-Only cache will not be serilized(ther's no benefit)
   After (words to the effect).
iBatis caching defaults to user session cache only. A more advanced mode that will increase cache hits is to share a cache across users, which requires understanding transactions and stale data and flushing, may give you a huge performance increase at some staleness risk when you serialize="true".

.V



Larry Meadors wrote:
Make the cache read-only and serializable, and it will be container wide.

Larry

On Fri, Jul 11, 2008 at 9:56 AM, Vic Cekvenich <[EMAIL PROTECTED]> wrote:
Before:
protected ThreadLocal localSqlMapSession = new ThreadLocal();
After:
protected static ThreadLocal localSqlMapSession = new ThreadLocal();
in SqlMapClientImpl

Rationale:
People(me) expect the cache to be "container"(war) wide, and not "session"
based. Ex: I have user1 pull put client 101,102,103, user2 pulls up 104 and
103: 103 should be in cache already, a cache hit. The FIX? should disable
the cache checking the session as part of the key.
At least it should be a "property" in "ibatis.xml" to turn on/off and some
docs.

I did this at a few ibatis deployments....


.V





Reply via email to