Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 55123 invoked from network); 29 Nov 2006 17:46:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Nov 2006 17:46:45 -0000 Received: (qmail 86539 invoked by uid 500); 29 Nov 2006 17:46:51 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 86528 invoked by uid 500); 29 Nov 2006 17:46:51 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 86502 invoked by uid 99); 29 Nov 2006 17:46:51 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Nov 2006 09:46:51 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of brandon.goodin@gmail.com designates 66.249.92.174 as permitted sender) Received: from [66.249.92.174] (HELO ug-out-1314.google.com) (66.249.92.174) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Nov 2006 09:46:39 -0800 Received: by ug-out-1314.google.com with SMTP id m2so1657528ugc for ; Wed, 29 Nov 2006 09:46:18 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=C7Yb86R/Wj2sdJNhzL6wJxqdZmoNydEtdfPSN/3rwIvVgbnguiasCXhuppqID3bq+QN/WswwAra381vlfiZ3rkhRefM01VBNoELt5FI/3/VFTiuzcwLdih9UH912FYO03g+exVHE4rSSnkK8uZBRpZRTN7McMW+Nnyia2UCUv78= Received: by 10.82.142.9 with SMTP id p9mr639081bud.1164822377501; Wed, 29 Nov 2006 09:46:17 -0800 (PST) Received: by 10.82.184.4 with HTTP; Wed, 29 Nov 2006 09:46:17 -0800 (PST) Message-ID: <2fe5ef5b0611290946u4d1e9c12y5fb3155641a015c9@mail.gmail.com> Date: Wed, 29 Nov 2006 11:46:17 -0600 From: "Brandon Goodin" To: user-java@ibatis.apache.org Subject: Re: specify which transaction manager to use ? In-Reply-To: <65daf6a60611220609w7b2308ccr6f3d23d348186ef6@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <65daf6a60611220609w7b2308ccr6f3d23d348186ef6@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org 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 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