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
reads.

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.

Brandon

On 11/22/06, Ulrich Staudinger <[EMAIL PROTECTED]> 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

Reply via email to