ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brandon Goodin <brandon.goo...@gmail.com>
Subject Re: how to have two datasources in sql-map-config.xml
Date Fri, 01 May 2009 19:01:04 GMT
Hey Bhaarat,
The example you provided is the approach I would take in your situation.

Brandon Goodin

On Fri, May 1, 2009 at 1:25 PM, Bhaarat Sharma <bhaarat.s@gmail.com> wrote:

> Brandon,
> I think your reply came as I was tying up my reply.  Please check out my
> second reply to see if that makes sense.
>
> Thanks
>
>
> On Fri, May 1, 2009 at 2:21 PM, Brandon Goodin <brandon.goodin@gmail.com>wrote:
>
>> Why not create a separate SqlMapClient for the Oracle database?
>>
>> Brandon Goodin
>>
>>
>>
>> On Fri, May 1, 2009 at 1:09 PM, Bhaarat Sharma <bhaarat.s@gmail.com>wrote:
>>
>>> Hi
>>> Currently our sql-map-config looks like this:
>>>
>>> <sqlMapConfig>
>>>    <settings enhancementEnabled="true" useStatementNamespaces="true" />
>>>  <transactionManager type="JDBC">
>>> <dataSource type="JNDI">
>>>  <property name="DataSource" value="jdbc/RSGH/IJA/twy/ftwdb" />
>>> </dataSource>
>>>  </transactionManager>
>>>  <sqlMap resource="existingSearch.xml" />
>>>         <sqlMap resource="deceased_search.xml"/>
>>>         <sqlMap resource="multiLoanSearch.xml"/>
>>> </sqlMapConfig>
>>>
>>> In the above we only have one JDBC connection and this connection goes to
>>> a SQL Server.  However, now we will have to access another DB which is in
>>> Oracle.  So we will have to create another JDBC connection and have some of
>>> our sqlMaps reference that NEW JDBC connection.  Can this be done in iBatis?
>>> can we have multiple data sources, and if so, then how do
>>> we differentiate which DB a sqlMap references.
>>>
>>> Thanks!
>>>
>>
>>
>

Mime
View raw message