Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 202 invoked from network); 4 Nov 2005 21:03:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Nov 2005 21:03:11 -0000 Received: (qmail 40745 invoked by uid 500); 4 Nov 2005 21:03:11 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 40461 invoked by uid 500); 4 Nov 2005 21:03:09 -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 40450 invoked by uid 99); 4 Nov 2005 21:03:09 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Nov 2005 13:03:09 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of larry.meadors@gmail.com designates 64.233.162.207 as permitted sender) Received: from [64.233.162.207] (HELO zproxy.gmail.com) (64.233.162.207) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Nov 2005 13:03:03 -0800 Received: by zproxy.gmail.com with SMTP id k1so464618nzf for ; Fri, 04 Nov 2005 13:02:47 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=I339eAQElYccEb1DliHDWk2t5Bs585i8edMGgAaq/vXPwt8m/Y50yjDgK9Uslc/6a6i+uLNrROdk7Fl05RyJzJyUgZcILpiicJ1jNW7gYL2dxuF0ql+yCetuj8ya6R8dg3ellraMJCUE7Tq5ow43Qqs4yRBUDd28DEEWXmyaZpY= Received: by 10.36.121.8 with SMTP id t8mr338748nzc; Fri, 04 Nov 2005 13:02:47 -0800 (PST) Received: by 10.36.120.13 with HTTP; Fri, 4 Nov 2005 13:02:46 -0800 (PST) Message-ID: Date: Fri, 4 Nov 2005 14:02:46 -0700 From: Larry Meadors Reply-To: lmeadors@apache.org Sender: larry.meadors@gmail.com To: user-java@ibatis.apache.org Subject: Re: Same table, multiple sources In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Uhm, that is already available. ;-) public Dao getDao(Class iface, String contextId); ... ... Larry On 11/4/05, Voorhoeve, Niels {PBG} wrote: > Hi, > > I have a situation where I need to read the same table from a couple of > different servers. I'm using the ibatis dao framework on top of ibatis > sqlmaps. I've thought of a couple of solutions and was wondering what th= e > best practice is? > > 1. > a. Copy the sqlmap config file for the table to a new name. > b. Create another Dao class and context to use the new file. > > 2. > a. Create a second instance of a DaoManager from a second > dao-config.xml which reuses the same dao class and table. > > > It would be nice if the daoManager had a feature to specify the context t= o > use so that the above wouldn't be necessary. Would it be feasible to add > such a feature? > > I guess it would look something like: > dao-config.xml: > > ... > > > daoManager.getDao(SomeBean.class, "this.server"); > > Thanks, > Niels >