Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 69317 invoked from network); 31 Jul 2006 14:20:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 31 Jul 2006 14:20:17 -0000 Received: (qmail 79061 invoked by uid 500); 31 Jul 2006 14:20:14 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 79045 invoked by uid 500); 31 Jul 2006 14:20:14 -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 78940 invoked by uid 99); 31 Jul 2006 14:20:14 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Jul 2006 07:20:13 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of larry.meadors@gmail.com designates 64.233.182.189 as permitted sender) Received: from [64.233.182.189] (HELO nf-out-0910.google.com) (64.233.182.189) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Jul 2006 07:20:11 -0700 Received: by nf-out-0910.google.com with SMTP id c31so519847nfb for ; Mon, 31 Jul 2006 07:19:50 -0700 (PDT) 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:x-google-sender-auth; b=ecOpFPJ5Al88dBK478FW+NUAIj38py/fcJjX6ebW8vZe2OF0uZv9YMdzP0/V5mP3MTh4u4SOqOKcl53MPgLMykz+9WH6TKaqFmH+mC/U6nLABC3kd6ZjwgyvYPBF9CoCIfRrAtQubjFabtdCJ4a9yurTXEax29U+V9AvbbFiyrY= Received: by 10.78.131.13 with SMTP id e13mr489833hud; Mon, 31 Jul 2006 07:19:49 -0700 (PDT) Received: by 10.78.149.20 with HTTP; Mon, 31 Jul 2006 07:19:48 -0700 (PDT) Message-ID: Date: Mon, 31 Jul 2006 08:19:48 -0600 From: "Larry Meadors" Reply-To: lmeadors@apache.org Sender: larry.meadors@gmail.com To: user-java@ibatis.apache.org Subject: Re: connections to different databases In-Reply-To: <8267A5C8B2C7AD4DBE9C29304C6104DE01ED6DA7@so1evn001.Office.local> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <8267A5C8B2C7AD4DBE9C29304C6104DE01ED6DA7@so1evn001.Office.local> X-Google-Sender-Auth: 97b5821b0aa3464a X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I would not reccomend trying to use a single instance for two databases - just create two. Remember, you can pass a properties object into the sqlmap client builder to customize the created sql map client. Larry On 7/31/06, Mkhitaryan, Aram wrote: > Oh, I have never used IBATIS with Spring. > > I was talking about custom implementation/handling sqlmap client or daomanager. > > But I think there should be another configuration for this case. > > If I find useful documentation I will send the link. > > Best, > Aram > > -----Original Message----- > From: Gwyn Evans [mailto:gwyn.evans@gmail.com] > Sent: Monday, July 31, 2006 4:59 PM > To: user-java@ibatis.apache.org > Subject: Re: connections to different databases > > It certainly looks so - I've only got a Spring setup, though... > e.g. > class="org.springframework.jndi.JndiObjectFactoryBean"> > ${jndi.name} > > > class="org.springframework.orm.ibatis.SqlMapClientFactoryBean"> > > > > > > > > > > > > > In the above, I'm using a shared dataSource, but the DaoImpls extend > Spring's SqlMapClientDaoSupport, which also supports a "dataSource" > property, so I'd expect to be able to remove it from the > "sqlMapClient" bean and add Dao-specific ones to the DaoImpl beans. > > /Gwyn > > On 31/07/06, Eugeny N Dzhurinsky wrote: > > Hello! > > Is it possible somehow to use several databases for single SqlMapClient > > instance? > > > > For example, I would like to use queries in namespace "spider" to be executed > > on MySQL, and queries in the reset namepaces to be executed on PostgreSQL, w/o > > creating 2 instances of SQL map clients. > > > > -- > > Eugene N Dzhurinsky > > >