ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clinton Begin <clinton.be...@gmail.com>
Subject Re: Multiple Database Best Practices
Date Sat, 09 Jul 2005 20:56:25 GMT
Multiple databases are supported by defining multiple <context> blocks.

Clinton

On 7/6/05, Mitchell, Steven C <Steven.Mitchell@umb.com> wrote:
> 
> Answered my own question. I can pass the name of the various mapping 
> config files I need in a properties file:
>  properties.setProperty("ibatis.mapping.conf", "the file I need"); 
> return DaoManagerBuilder.buildDaoManager( reader, properties );
>   <transactionManager type="SQLMAP">
>  <property name="SqlMapConfigResource" value="${ibatis.mapping.config}" />
> </transactionManager>
>   -----Original Message-----
> *From:* Mitchell, Steven C 
> *Sent:* Wednesday, July 06, 2005 7:54 AM
> *To:* 'user-java@ibatis.apache.org'
> *Subject:* RE: Multiple Database Best Practices
> 
>  How does that work? Looking at the DTD there can be only one 
> TransactionManager. Multiple property elements are allowed, but does iBatis 
> support multiple "SqlMapConfigResource" properties within a 
> TransactionManager?
>  <transactionManager type="SQLMAP">
>  <property name="SqlMapConfigResource" value="${ibatis.mapping.config}" />
>  <property name="SqlMapConfigResource" value="${
> my.other.ibatis.mapping.config}" />
> </transactionManager>
>  
>  -----Original Message-----
> *From:* Clinton Begin [mailto:clinton.begin@gmail.com] 
> *Sent:* Tuesday, July 05, 2005 10:00 PM
> *To:* user-java@ibatis.apache.org
> *Subject:* Re: Multiple Database Best Practices
> 
> 
> You're right about the multiple SqlMapConfig.xml files, but you need only 
> one dao.xml file, as DAO supports multiple datasources.
> 
> Cheers,
> Clinton
> 
> 
> On 7/5/05, Mitchell, Steven C <Steven.Mitchell@umb.com> wrote: 
> > 
> > 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?
> > 
> 
>

Mime
View raw message