(read-only=false does not cache).

So serialize="true" works, but not all the time. I spent a few hours and could not find a pattern of when/why it works sometimes and sometimes not. The code patch works 100% of time for those that want that effect.

I propose that in addition to docs, the code also be changed so that it can be set via some property so it works reliably. If people think about it an like that kind of a design I could work more to make it easier to apply the potential patch.

btw, the way I test is by turning sql logging in mysql to on.
.V


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

Before:
protected ThreadLocal localSqlMapSession = new ThreadLocal();
After:
protected static ThreadLocal localSqlMapSession = new ThreadLocal();
in SqlMapClientImpl


Reply via email to