Hi, 

 

1.       Creates a SqlMap.xml and data maps for each database.

2.       Creates a DomSqlMapBuilder instance for each database.

3.       Call DomSqlMapBuilder.Configure(…) with the corresponding
SqlMap.xml for each instance.

4.       Use the ISqlMapper instances returned from the previous step for
accessing a certain database.

 

 

Pseudo code:

 

DomSqlMapBuilder builderA = new DomSqlMapBuilder();

ISqlMapper mapperA = builderA.Configure(“sqlMap_A.xml”);

 

DomSqlMapBuilder builderB = new DomSqlMapBuilder();

ISqlMapper mapperB = builder.Configure(“sqlMap_B.xml”);

 

 

Smartkid

 

发件人: Nathan O. Miller [mailto:[EMAIL PROTECTED] 
发送时间: 2008年1月26日 2:38
收件人: [email protected]
主题: Multiple Datasources?

 

Hello everyone,

 

I have a web application that contains individual tools that each use their
own database.  Is there some way for IBatis to support the use of multiple
datasources for something like this?  

 

Thanks,

Nathan Miller

Reply via email to