Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 87291 invoked from network); 9 Jul 2005 20:56:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 Jul 2005 20:56:29 -0000 Received: (qmail 9761 invoked by uid 500); 9 Jul 2005 20:56:28 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 9745 invoked by uid 500); 9 Jul 2005 20:56:28 -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 9725 invoked by uid 99); 9 Jul 2005 20:56:27 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 09 Jul 2005 13:56:27 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of clinton.begin@gmail.com designates 64.233.184.193 as permitted sender) Received: from [64.233.184.193] (HELO wproxy.gmail.com) (64.233.184.193) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 09 Jul 2005 13:56:26 -0700 Received: by wproxy.gmail.com with SMTP id 68so631490wri for ; Sat, 09 Jul 2005 13:56:25 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:references; b=J6nfPcW29/uuy1GrHboJKGXnfKRtMwIkXQfwoPXClkb/cZtjCGNdfd2eKyzLwEKCBLF0U+ge4xy9JP4TTsObyKrAb9A6Wtub5V5+84aEyKPLvPgxrlWei+0JVK3wuO45ik8UGEaWFUiS/w1lPuI4t4L+uCasJwAjELVRDQ/uY+8= Received: by 10.54.33.65 with SMTP id g65mr2820720wrg; Sat, 09 Jul 2005 13:56:25 -0700 (PDT) Received: by 10.54.93.11 with HTTP; Sat, 9 Jul 2005 13:56:25 -0700 (PDT) Message-ID: <16178eb105070913564f63401c@mail.gmail.com> Date: Sat, 9 Jul 2005 14:56:25 -0600 From: Clinton Begin Reply-To: cbegin@ibatis.com To: user-java@ibatis.apache.org Subject: Re: Multiple Database Best Practices In-Reply-To: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5753_1826841.1120942585604" References: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_5753_1826841.1120942585604 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Multiple databases are supported by defining multiple blocks. Clinton On 7/6/05, Mitchell, Steven C wrote: >=20 > Answered my own question. I can pass the name of the various mapping=20 > config files I need in a properties file: > properties.setProperty("ibatis.mapping.conf", "the file I need");=20 > return DaoManagerBuilder.buildDaoManager( reader, properties ); > > > > -----Original Message----- > *From:* Mitchell, Steven C=20 > *Sent:* Wednesday, July 06, 2005 7:54 AM > *To:* 'user-java@ibatis.apache.org' > *Subject:* RE: Multiple Database Best Practices >=20 > How does that work? Looking at the DTD there can be only one=20 > TransactionManager. Multiple property elements are allowed, but does iBat= is=20 > support multiple "SqlMapConfigResource" properties within a=20 > TransactionManager? > > > my.other.ibatis.mapping.config}" /> > > =20 > -----Original Message----- > *From:* Clinton Begin [mailto:clinton.begin@gmail.com]=20 > *Sent:* Tuesday, July 05, 2005 10:00 PM > *To:* user-java@ibatis.apache.org > *Subject:* Re: Multiple Database Best Practices >=20 >=20 > You're right about the multiple SqlMapConfig.xml files, but you need only= =20 > one dao.xml file, as DAO supports multiple datasources. >=20 > Cheers, > Clinton >=20 >=20 > On 7/5/05, Mitchell, Steven C wrote:=20 > >=20 > > Is there a recommended best practice for handling an application that > > connects to multiple databases? Is it as simple as maintaining multiple > > sets of dao.xml and sql-config.xml files? > >=20 >=20 > ------=_Part_5753_1826841.1120942585604 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
Multiple databases are supported by defining multiple <context> block= s.

Clinton

On 7/6/05, Mitchell, Steven C <Steven.Mitchell@umb.com> wrote:
Answered my ow= n question.  I can pass the name of=20 the various mapping config files I need in a properties=20 file:
=  
properties.set= Property("ibatis.mapping.conf", "the file=20 I need"); 
return=20 DaoManagerBuilder.buildDaoManager( reader, properties );
 
<transactionManager type=3D&q= uot;SQLMAP" >
&n= bsp;   <property = name=3D"SqlMapConfigResource"  value=3D"${ibatis.mapping.config}" />
</transactionManager>
 
-----Original Messa= ge-----
From:=20 Mitchell, Steven C
Sent: Wednesday, July 06, 2005 7:54=20 AM
To: 'user-java@= ibatis.apache.org'
Subject: RE: Multiple=20 Database Best Practices

How=20 does that work?  Looking at the DTD there can be only one=20 TransactionManager.  Multiple property elements are allowed, but doe= s=20 iBatis support multiple "SqlMapConfigResource" properties withi= n a=20 TransactionManager?
 <= /span>
<transactionManager type=3D= "SQLMAP" >
=     <property name=3D"SqlMapConfigResource"  value=3D"${ibatis.mapping.config}" />
   =20 <property name=3D"SqlMapCo= nfigResource"  value=3D"${my.other.ibatis.mapping.config}" /><= /font>
</<= /font>transactionManager>
 
-----Original Message-----
From: Clinton Begin=20 [mailto:clinton.begin@gmail.= com]
Sent: Tuesday, July 05, 2005=20 10:00 PM
To: u= ser-java@ibatis.apache.org
Subject: Re:=20 Multiple Database Best Practices


You're right a= bout=20 the multiple SqlMapConfig.xml files, but you need only one dao.xml file= , as=20 DAO supports multiple datasources.

Cheers,
Clinton

On 7/5/05, Mitchell,=20 Steven C <Steven.Mitc= hell@umb.com>=20 wrote:=20
Is=20 there a recommended best practice for handling an application=20 that
connects to multiple databases?  Is it as simple as= =20 maintaining multiple
sets of dao.xml and sql-config.xml=20 files?


------=_Part_5753_1826841.1120942585604--