ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brandon Goodin" <brandon.goo...@gmail.com>
Subject Re: specify which transaction manager to use ?
Date Wed, 29 Nov 2006 17:46:17 GMT
This is a really interesting use case. You would need to create two
different sqlMapConfig with two different transaction managers
configured. They could point to the same sqlmap files. One sqlmap that
had your Master specified for writes and the other for your Slave for

This would create two different sqlmap clients in memory and cause
issues if you are using iBATIS caching. Since iBATIS canching
configuration relies on intercepting certain calls that trigger cache
flushes within the same sqlmap instance. If you have your reads and
wrties done in two different sqlmaps you would limit your caching to
only timed cache flushes on the read only sqlmap.


On 11/22/06, Ulrich Staudinger <ustaudinger@gmail.com> wrote:
> Hi there,
>  i have a little problem with a larger Master-Slave mysql scenario.
>  I want to use the slaves for reading and the master for writing. Now, i
> would have created two transactionManager entries and i would then specify
> for a method which transaction Manager to use. Is that actually the correct
> approach for using ibatis or should i pursue a different approach ? Which
> approach should i use ?
>  Thanks for additional information,
>  best regards,
>  Ulrich Staudinger
> --
> Ulrich B. Staudinger

View raw message