ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Meadors <larry.mead...@gmail.com>
Subject Re: Dynamically Discovering DataSource
Date Thu, 21 Apr 2005 15:26:20 GMT
Roll your own javax.sql.DataSource (6 methods) and 
com.ibatis.sqlmap.engine.datasource.DataSourceFactory (2 methods).

Larry

On 4/21/05, Rafiq, Adnan <arafiq@carreker.com> wrote:
> 
> I have a situation where we have an ASP-like environment. There is one 
> system database and several customer-specific databases. Each customer 
> database is mapped to a different datasource. In iBatis we have to hardcode 
> the JNDI name for the datasource in the sql-map-confi.xml file. Is there 
> anyway to make this dynamic? In other words, I want to query the customer 
> datasource name (the names are stored in the system database) at run time 
> based on the user id, and then use that name for getting my connections.
>  Any help is greatly appreciated.
>

Mime
View raw message